Skip to content

Commit

Permalink
ci: use dockerLogs step (elastic#810)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v authored Jun 4, 2020
1 parent 135a6a7 commit 5c1ef54
Showing 1 changed file with 13 additions and 7 deletions.
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 {
// 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

0 comments on commit 5c1ef54

Please sign in to comment.