cloud-infra: Pre-provisioned slaves and wait before using slave 91/491/2
authorFatih Degirmenci <fdegir@gmail.com>
Tue, 26 Feb 2019 13:52:07 +0000 (14:52 +0100)
committerFatih Degirmenci <fdegir@gmail.com>
Tue, 26 Feb 2019 13:55:45 +0000 (14:55 +0100)
Jenkins OpenStack instances doesn't really help in our case since the
job needs a slave where it can trigger creation of a slave from
OpenStack which will break the downstream triggering of job on same
slave. We instead fallback to pre-provisioned slaves.

Another issue is that when the instance first gets attached to Jenkins
as slave, it takes some time before it becomes fully functional so
we need to wait.

Change-Id: Ic77b81d2bbdd107cd1a506fc1e9f7ec6be6b3c1e

jjb/cloud-infra/cloud-infra-verify-jobs.yaml

index 901ceb6b0e77450fd59041425dff6b5cff605023..100371047fa67a05f28529c9e099e5c65e95e8f3 100644 (file)
@@ -56,6 +56,9 @@
           project: '{project}'
           branch: '{branch}'
       - nordix-gerrit-parameters
+      - label:
+          name: SLAVE_LABEL
+          default: 'cloud-infra-vpod'
       - string:
           name: DISTRO
           default: '{distro}'
           timeout: 120
       - fix-workspace-permissions
       - openstack:
-          instances:
-            - cloud-name: Xerces_EST_ONAP
-              template-name: cloud-infra-vpod
-              count: 1
           single-use: True
 
     scm:
 - builder:
     name: 'cloud-infra-verify-deploy-macro'
     builders:
+      - shell: |
+          #!/bin/bash
+
+          # it takes some time before the OpenStack slave becomes fully operational
+          # so we give it some more time before doing anything
+          sleep 30
       - shell:
           !include-raw: ./cloud-infra-deploy.sh