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

ci: use dockerLogs step #810

Merged
merged 4 commits into from
Jun 4, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -389,16 +389,22 @@ def runScript(Map args = [:]){
sleep randomNumber(min: 5, max: 10)
sh(label: 'Pull and build docker infra', script: '.ci/scripts/pull_and_build.sh')
}
// Another retry in case there are any environmental issues
retry(3) {
sleep randomNumber(min: 5, max: 10)
if(env.MODE == 'saucelabs'){
withSaucelabsEnv(){
try {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is required to be able to run a post-build step within this method. We could potentially add this section to the post-build always step. What do you prefer?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, I'm afraid we cannot do the post-block though, the runAllScopes runs several scopes in a loop :(

// Another retry in case there are any environmental issues
retry(3) {
sleep randomNumber(min: 5, max: 10)
if(env.MODE == 'saucelabs'){
withSaucelabsEnv(){
sh(label: "Start Elastic Stack ${stack} - ${scope} - ${env.MODE}", script: '.ci/scripts/test.sh')
}
} else {
sh(label: "Start Elastic Stack ${stack} - ${scope} - ${env.MODE}", script: '.ci/scripts/test.sh')
}
} else {
sh(label: "Start Elastic Stack ${stack} - ${scope} - ${env.MODE}", script: '.ci/scripts/test.sh')
}
} catch(e) {
throw e
} finally {
dockerLogs(step: "${label}-${stack}", failNever: true)
}
}
}
Expand Down