Wait for aptly to come up (to generate GPG)

Change-Id: Ia4e41af241f447f35fb88f9afeed2c6690be46ad
diff --git a/cicd-lab-pipeline.groovy b/cicd-lab-pipeline.groovy
index ec8bb2e..464da3a 100644
--- a/cicd-lab-pipeline.groovy
+++ b/cicd-lab-pipeline.groovy
@@ -148,6 +148,10 @@
                 salt.syncAll(saltMaster, '*')
 
                 // Aptly
+                timeout(10) {
+                    println "Waiting for Aptly to come up.."
+                    salt.cmdRun(saltMaster, 'I@aptly:server', 'while true; do curl -svf http://172.16.10.254:8084 >/dev/null && break; done')
+                }
                 salt.enforceState(saltMaster, 'I@aptly:server', 'aptly', true)
 
                 // OpenLDAP