-
Notifications
You must be signed in to change notification settings - Fork 262
add travis CI platform #3268
add travis CI platform #3268
Conversation
|
Can one of the admins verify this patch? |
|
Travis is already enabled. Working instance is here |
.travis.yml
Outdated
| include: | ||
| - stage: Lint & Test | ||
| # Terraform lint | ||
| script: docker run -v $(pwd):/data -t wata727/tflint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we'll need to mirror this docker image
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And maintain it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@paulfantom. Yes as a rule we try not to depend on random third party containers whose maintenance and security we cannot guarantee.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@enxebre @squat I agree that golang-testing and yamllint containers should be mirrored, but this one (wata727/tflint) is an official one, do we also mirror official ones?
.travis.yml
Outdated
| # YAML lint | ||
| - script: > | ||
| docker run -t -v $(pwd):/workdir | ||
| giantswarm/yamllint --config-data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we'll need to mirror this docker image
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And maintain it?
.travis.yml
Outdated
| ./examples/ ./installer/ | ||
| # Go lint | ||
| #- script: "docker run -v $PWD:$PWD -w $PWD appleboy/golang-testing golint -set_exit_status installer/..." | ||
| - script: "docker run -v $PWD:$PWD -w $PWD appleboy/golang-testing golint installer/..." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we'll need to mirror this docker image.
FYI at some point you might wanna try to revive #3115 and integrate gometalinter here somehow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And maintain it?
.travis.yml
Outdated
| # Installer unit tests | ||
| - script: "chmod 0777 $PWD && docker run -v $PWD:$PWD:rw -w $PWD $BAZEL_IMG bazel test installer:cli_units --test_output=all" | ||
| - stage: Build | ||
| script: "chmod 0777 $PWD && docker run -v $PWD:$PWD:rw -w $PWD $BAZEL_IMG bazel --output_base=.cache build tarball" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need --output_base=.cache? we already have a .bazelrc file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to stay close to commands we have in README.md, but I can remove --output_base=.cache
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea behind .bazelrc is to have consistent and replicable behaviour across envs. Update readme sound good to me unless I'm missing something different when building via docker cc @squat
Run basic tests in travis-ci platform. This runs same tests as Jenkins instance in "basic" mode, adds 3 types of linters (terraform, yaml, go), and builds package.
This doesn't deploy anything to AWS so it is meant to be run on every PR.
Linters:
tflintis used to lint terraform files in whole repositoryyamllintis used to lint every file inexamplesandinstallerdirectories and subdirectories. It is permissive about line length.golintrecursively checks go files ininstallerdirectory. For now it is set to be in permissive mode (enforcing version is commented-out) due to some errors in libvirt.go file.