Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jenkinsfile: fail build fast if one parallel stage fails #2246

Merged
merged 2 commits into from
Dec 5, 2017

Conversation

ianvernon
Copy link
Member

@ianvernon ianvernon commented Dec 4, 2017

  • Set failFast option to true in the Jenkinsfile so that if any stage in the build fails, all stages terminate and post-build actions are ran immediately. This will increase throughput for jobs on Jenkins.
  • Destroy envoy stage VM as part of post-build actions. I found this while making sure that setting failFast did not cause any regressions by leaving VMs up and running on Jenkins. This was occurring because there was no invocation of vagrant destroy -f with CILIUM_USE_ENVOY=1 in the Jenkinsfile.

Signed-off by: Ian Vernon [email protected]

Fixes: #2248

fail all stages in build if any stage fails in Jenkins

@ianvernon ianvernon added area/CI Continuous Integration testing issue or flake wip labels Dec 4, 2017
@ianvernon ianvernon requested a review from a team as a code owner December 4, 2017 22:52
@ianvernon ianvernon added pending-review release-note/minor This PR changes functionality that users may find relevant to operating Cilium. and removed wip labels Dec 4, 2017
@ianvernon ianvernon changed the title WIP - Jenkinsfile: fail build fast if one parallel stage fails Jenkinsfile: fail build fast if one parallel stage fails Dec 4, 2017
The VM used for Envoy builds was left running because CILIUM_USE_ENVOY was not
set for `vagrant destroy` commands in the Jenkinsfile.

Signed-off by: Ian Vernon <[email protected]>
@ianvernon
Copy link
Member Author

To test this, I made the file tests/00-fmt.sh fail intentionally by changing exit 0 to exit 1 so that the booting of the runtime test VM would fail. All other stages failed immediately after this occurred, indicating that failFast worked appropriately.

https://jenkins.cilium.io/job/cilium/job/cilium/job/PR-2246/2/flowGraphTable/

@ianvernon ianvernon merged commit 717060f into master Dec 5, 2017
@ianvernon ianvernon deleted the failfast-jenkinsfile branch December 5, 2017 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/CI Continuous Integration testing issue or flake release-note/minor This PR changes functionality that users may find relevant to operating Cilium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants