waitForServices is no longer needed
Change-Id: Ife1c37ed61a53ae7d0811c814b4c665605aee812
diff --git a/cicd-lab-pipeline.groovy b/cicd-lab-pipeline.groovy
index e56fdad..b742e04 100644
--- a/cicd-lab-pipeline.groovy
+++ b/cicd-lab-pipeline.groovy
@@ -32,26 +32,6 @@
salt = new com.mirantis.mk.Salt()
orchestrate = new com.mirantis.mk.Orchestrate()
-def waitForServices(saltMaster) {
- retry(30) {
- out = salt.cmdRun(saltMaster, 'I@docker:swarm:role:master', """/bin/bash -c 'docker service ls | grep -E "0/[0-9]+"' && echo 'Some services are not running'""")
- for (int a = 0; a < out['return'].size(); a++) {
- def entry = out['return'].get(a)
- for (int i = 0; i < entry.size(); i++) {
- def node = entry.get(i)
- if (node) {
- if (node.value =~ /Some services are not running/) {
- sleep(10)
- throw new Exception("$node.key: $node.value")
- } else {
- print out
- }
- }
- }
- }
- }
-}
-
timestamps {
node {
try {
@@ -165,7 +145,6 @@
// XXX: Hack to fix dependency of gerrit on mysql
print salt.cmdRun(saltMaster, 'I@docker:swarm:role:master', "docker service rm gerrit; sleep 5; rm -rf /srv/volumes/gerrit/*")
- waitForServices(saltMaster)
timeout(10) {
salt.cmdRun(saltMaster, 'I@docker:swarm:role:master', 'apt-get install -y mysql-client')
@@ -174,11 +153,11 @@
}
salt.enforceState(saltMaster, 'I@docker:swarm:role:master', 'docker.client')
// ---- cut here (end of hack) ----
-
- waitForServices(saltMaster)
}
stage("Configure CI/CD services") {
+ salt.syncAll(saltMaster, '*')
+
// Aptly
salt.enforceState(saltMaster, 'I@aptly:server', 'aptly', true)