Workaround to have /var/lib/jenkins on all nodes
jenkins_slave02 and jenkins_slave03 can not properly start because there
is no such directory as `/var/lib/jenkins` because only on
jenkins_slave01 this directory is present because there the `jenkins.client`
state is executed.
Change-Id: Ibd25652672e61f3bc6dd01f3aa7e7977394512da
diff --git a/cicd-lab-pipeline.groovy b/cicd-lab-pipeline.groovy
index a12e29a..ea19049 100644
--- a/cicd-lab-pipeline.groovy
+++ b/cicd-lab-pipeline.groovy
@@ -173,6 +173,9 @@
sleep(5)
salt.enforceState(saltMaster, 'I@docker:swarm:role:master', 'docker.client')
}
+ // XXX: Workaround to have `/var/lib/jenkins` on all
+ // nodes where are jenkins_slave services are created.
+ salt.runSaltProcessStep(saltMaster, 'I@docker:swarm', 'cmd.run', ['mkdir -p /var/lib/jenkins'])
}
stage("Configure CI/CD services") {