Skip to content

Commit

Permalink
chore: add resiliency when provisioning the stack (elastic#1990)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdelapenya authored Jan 11, 2022
1 parent 686c531 commit 54e882b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,13 @@ pipeline {
// Must be gathered after deployment as the public IP is known at that time
def stackRunner = getNodeIp(stackWorkspace, 'stack')

ansible(stackWorkspace,
env.RUN_ID.split('-')[0],
"-i \"${stackRunner.ip},\" -t setup-stack --extra-vars=\"nodeLabel=stack nodeImage=${stackMachine.image} nodeInstanceType=${stackMachine.instance_type}\"")
retryWithSleep(retries: 2, seconds: 5, backoff: true) {
ansible(
stackWorkspace,
env.RUN_ID.split('-')[0],
"-i \"${stackRunner.ip},\" -t setup-stack --extra-vars=\"nodeLabel=stack nodeImage=${stackMachine.image} nodeInstanceType=${stackMachine.instance_type}\""
)
}

// Update stash with latest changes from the stack deployment
stash allowEmpty: true, name: 'sourceEnvModified', useDefaultExcludes: false
Expand Down

0 comments on commit 54e882b

Please sign in to comment.