Retry for jenkins state
Change-Id: I8caa49b8356262b721f8c77f1a78ffac74367bb9
diff --git a/cicd-lab-pipeline.groovy b/cicd-lab-pipeline.groovy
index b6051fd..c935af7 100644
--- a/cicd-lab-pipeline.groovy
+++ b/cicd-lab-pipeline.groovy
@@ -203,7 +203,11 @@
println "Waiting for Jenkins to come up.."
salt.cmdRun(saltMaster, 'I@jenkins:client', 'while true; do curl -sf 172.16.10.254:8081 >/dev/null && break; done')
}
- salt.enforceState(saltMaster, 'I@jenkins:client', 'jenkins', true)
+ retry(2) {
+ // XXX: needs retry as first run installs python-jenkins
+ // thus make jenkins modules available for second run
+ salt.enforceState(saltMaster, 'I@jenkins:client', 'jenkins', true)
+ }
// Rundeck
timeout(10) {