Adjust jobs based on supported distros
[infra/cicd.git] / jjb / cloud-infra / cloud-infra-verify-jobs.yaml
index ee06cea78b38487002127c76ba5ceed4f0894468..65c6ea0a7ceb7aea7529381da40b9bb94f4d70b0 100644 (file)
           branch: '{stream}'
           disabled: 'false'
 
-    distro:
-      - ubuntu1604
+    os:
+      - ubuntu1604:
+          distribution: ubuntu16
+          disabled: 'false'
+      - ubuntu1804:
+          distribution: ubuntu18
+          disabled: 'true'
+      - centos7:
+          distribution: centos7
+          disabled: 'true'
 
     type:
       - virtual
       - test
 
     jobs:
-      - 'cloud-infra-verify-{distro}-{type}-{stream}'
-      - 'cloud-infra-verify-{distro}-{phase}-{type}-{stream}'
+      - 'cloud-infra-verify-{os}-{type}-{stream}'
+      - 'cloud-infra-verify-{os}-{phase}-{type}-{stream}'
 
 - job-template:
-    name: 'cloud-infra-verify-{distro}-{type}-{stream}'
+    name: 'cloud-infra-verify-{os}-{type}-{stream}'
 
     project-type: multijob
 
       - nordix-gerrit-parameters
       - label:
           name: SLAVE_LABEL
-          default: 'cloud-infra-vpod-ubuntu1604-xerces'
-          all-nodes: false
-          node-eligibility: 'ignore-offline'
+          default: 'vpod-deploy-{os}'
       - string:
           name: DISTRO
-          default: '{distro}'
+          default: '{os}'
+      - string:
+          name: CLEANUP
+          default: 'true'
 
     properties:
       - logrotate
       - build-blocker:
           use-build-blocker: true
           blocking-jobs:
-            - 'cloud-infra-verify-{distro}-.*'
+            - 'cloud-infra-verify-{os}-.*'
             - 'cloud-infra-os-.*'
             - 'cloud-infra-k8-.*'
-          blocking-level: 'NODE'
+          block-level: 'NODE'
       - throttle:
           max-per-node: 1
-          max-total: 2
+          max-total: 3
           option: project
 
     wrappers:
-      - openstack:
-          single-use: True
       - build-timeout:
           timeout: 120
       - fix-workspace-permissions
+      - openstack:
+          single-use: True
 
     scm:
       - git-scm-gerrit:
           name: deploy
           condition: SUCCESSFUL
           projects:
-            - name: 'cloud-infra-verify-{distro}-deploy-{type}-{stream}'
+            - name: 'cloud-infra-verify-{os}-deploy-{type}-{stream}'
               current-parameters: true
               predefined-parameters: |
-                DISTRO={distro}
+                DISTRIBUTION={distribution}
+                CLEANUP=$CLEANUP
                 GERRIT_PROJECT=$GERRIT_PROJECT
                 GERRIT_BRANCH=$GERRIT_BRANCH
                 GERRIT_REFSPEC=$GERRIT_REFSPEC
           name: test
           condition: SUCCESSFUL
           projects:
-            - name: 'cloud-infra-verify-{distro}-test-{type}-{stream}'
+            - name: 'cloud-infra-verify-{os}-test-{type}-{stream}'
               current-parameters: true
               predefined-parameters: |
-                DISTRO={distro}
+                DISTRIBUTION={distribution}
+                CLEANUP=$CLEANUP
                 GERRIT_PROJECT=$GERRIT_PROJECT
                 GERRIT_BRANCH=$GERRIT_BRANCH
                 GERRIT_REFSPEC=$GERRIT_REFSPEC
               abort-all-job: true
 
 - job-template:
-    name: 'cloud-infra-verify-{distro}-{phase}-{type}-{stream}'
+    name: 'cloud-infra-verify-{os}-{phase}-{type}-{stream}'
 
     disabled: false
 
       - string:
           name: DISTRO
           default: 'ubuntu1604'
+      - string:
+          name: CLEANUP
+          default: 'false'
 
     wrappers:
       - build-timeout:
 - 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