Merge "Add wait method for Docker builds"
[releng.git] / jjb / xci / xci-daily-jobs.yml
index c685aa9..dbe3b65 100644 (file)
@@ -3,15 +3,22 @@
 #--------------------------------
 # BRANCH ANCHORS
 #--------------------------------
+# the versions stated here default to branches which then later
+# on used for checking out the branches, pulling in head of the branch.
+# but they also allow us to state sha1 so instead of checking out the
+# branches, we can check out sha1 if we want to use locked/specific
+# sha1 or manually enter sha1.
     master: &master
         stream: master
-        openstack-branch: '{stream}'
-        opnfv-branch: 'master'
+        openstack-osa-version: '{stream}'
+        openstack-bifrost-version: '{stream}'
+        opnfv-releng-version: 'master'
         gs-pathname: ''
     ocata: &ocata
         stream: ocata
-        openstack-branch: 'stable/{stream}'
-        opnfv-branch: 'master'
+        openstack-osa-version: 'stable/{stream}'
+        openstack-bifrost-version: 'stable/{stream}'
+        opnfv-releng-version: 'master'
         gs-pathname: '/{stream}'
 #--------------------------------
 #       scenarios
@@ -53,6 +60,7 @@
             dib-os-element: 'opensuse-minimal'
             dib-os-packages: 'vim,less,bridge-utils,iputils,rsyslog,curl'
             extra-dib-elements: 'openssh-server'
+
 #--------------------------------
 #        Phases
 #--------------------------------
         - 'xci-{scenario}-{pod}-{distro}-daily-{stream}'
         - 'xci-{phase}-{pod}-{distro}-daily-{stream}'
 
+#--------------------------------
+# VM defaults
+#--------------------------------
+- defaults:
+    name: daily_vm_defaults
+    test-vm-num-nodes: '6'
+    test-vm-node-names: 'xcimaster controller00 controller01 controller02 compute00 compute01'
+    vm-domain-type: 'kvm'
+    vm-cpu: '8'
+    vm-disk: '100'
+    vm-memory-size: '16384'
+    vm-disk-cache: 'unsafe'
+
 #--------------------------------
 # job templates
 #--------------------------------
     concurrent: false
 
     properties:
-        - logrotate-default
         - build-blocker:
             use-build-blocker: true
             blocking-jobs:
-                - 'xci-os-.*?-{pod}-daily-.*'
+                - '^xci-os.*'
             block-level: 'NODE'
+        - logrotate-default
 
     parameters:
+        - string:
+            name: OPENSTACK_OSA_VERSION
+            default: '{openstack-osa-version}'
+        - string:
+            name: OPENSTACK_BIFROST_VERSION
+            default: '{openstack-osa-version}'
+        - string:
+            name: OPNFV_RELENG_VERSION
+            default: '{opnfv-releng-version}'
+        - string:
+            name: USE_PROMOTED_VERSIONS
+            default: 'true'
         - string:
             name: DEPLOY_SCENARIO
             default: '{scenario}'
     triggers:
         - '{auto-trigger-name}'
 
+    wrappers:
+        - xci-fix-perms-workspace
+
     builders:
         - description-setter:
             description: "Built on $NODE_NAME"
         - trigger-builds:
             - project: 'xci-provision-{pod}-{distro}-daily-{stream}'
               current-parameters: false
-              predefined-parameters:
-                DEPLOY_SCENARIO={scenario}
+              predefined-parameters: |
+                OPENSTACK_OSA_VERSION=$OPENSTACK_OSA_VERSION
+                OPENSTACK_BIFROST_VERSION=$OPENSTACK_BIFROST_VERSION
+                OPNFV_RELENG_VERSION=$OPNFV_RELENG_VERSION
+                USE_PROMOTED_VERSIONS=$USE_PROMOTED_VERSIONS
+                DEPLOY_SCENARIO=$DEPLOY_SCENARIO
               same-node: true
               block: true
         - trigger-builds:
             - project: 'xci-deploy-{pod}-{distro}-daily-{stream}'
               current-parameters: false
-              predefined-parameters:
-                DEPLOY_SCENARIO={scenario}
+              predefined-parameters: |
+                OPENSTACK_OSA_VERSION=$OPENSTACK_OSA_VERSION
+                OPENSTACK_BIFROST_VERSION=$OPENSTACK_BIFROST_VERSION
+                OPNFV_RELENG_VERSION=$OPNFV_RELENG_VERSION
+                USE_PROMOTED_VERSIONS=$USE_PROMOTED_VERSIONS
+                DEPLOY_SCENARIO=$DEPLOY_SCENARIO
               same-node: true
               block: true
         - trigger-builds:
             - project: 'xci-functest-{pod}-{distro}-daily-{stream}'
               current-parameters: false
-              predefined-parameters:
-                DEPLOY_SCENARIO={scenario}
+              predefined-parameters: |
+                OPENSTACK_OSA_VERSION=$OPENSTACK_OSA_VERSION
+                OPENSTACK_BIFROST_VERSION=$OPENSTACK_BIFROST_VERSION
+                OPNFV_RELENG_VERSION=$OPNFV_RELENG_VERSION
+                USE_PROMOTED_VERSIONS=$USE_PROMOTED_VERSIONS
+                DEPLOY_SCENARIO=$DEPLOY_SCENARIO
               same-node: true
               block: true
               block-thresholds:
 
     disabled: '{obj:disabled}'
 
+    defaults: daily_vm_defaults
+
     concurrent: false
 
     properties:
-        - logrotate-default
         - build-blocker:
             use-build-blocker: true
             blocking-jobs:
-                - 'xci-provision-.*?-{pod}-daily-.*'
-                - 'xci-deploy-.*?-{pod}-daily-.*'
-                - 'xci-functest-.*?-{pod}-daily-.*'
+                - '^xci-provision.*'
+                - '^xci-deploy.*'
+                - '^xci-functest.*'
             block-level: 'NODE'
+        - logrotate-default
 
     parameters:
         - string:
-            name: OPENSTACK_BRANCH
-            default: '{openstack-branch}'
+            name: OPENSTACK_OSA_VERSION
+            default: '{openstack-osa-version}'
+        - string:
+            name: OPENSTACK_BIFROST_VERSION
+            default: '{openstack-osa-version}'
         - string:
-            name: OPNFV_BRANCH
-            default: '{opnfv-branch}'
+            name: OPNFV_RELENG_VERSION
+            default: '{opnfv-releng-version}'
         - string:
             name: USE_PROMOTED_VERSIONS
             default: 'true'
         - string:
             name: DIB_OS_PACKAGES
             default: '{dib-os-packages}'
+        - string:
+            name: TEST_VM_NUM_NODES
+            default: '{test-vm-num-nodes}'
+        - string:
+            name: TEST_VM_NODE_NAMES
+            default: '{test-vm-node-names}'
+        - string:
+            name: VM_DOMAIN_TYPE
+            default: '{vm-domain-type}'
+        - string:
+            name: VM_CPU
+            default: '{vm-cpu}'
+        - string:
+            name: VM_DISK
+            default: '{vm-disk}'
+        - string:
+            name: VM_MEMORY_SIZE
+            default: '{vm-memory-size}'
+        - string:
+            name: VM_DISK_CACHE
+            default: '{vm-disk-cache}'
         - string:
             name: CLEAN_DIB_IMAGES
             default: 'true'
+        - label:
+            name: SLAVE_LABEL
+            default: '{slave-label}'
+        - string:
+            name: ANSIBLE_VERBOSITY
+            default: ''
+
+    wrappers:
+        - xci-fix-perms-workspace
 
     builders:
         - description-setter:
             description: "Built on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
         - 'xci-{phase}-builder'
+
+#---------------------------
+# wrapper macros
+#---------------------------
+- wrapper:
+    name: xci-fix-perms-workspace
+    wrappers:
+        - pre-scm-buildstep:
+          - shell: |
+                #!/bin/bash
+                sudo chown -R $USER $WORKSPACE || exit 1
+
 #---------------------------
 # builder macros
 #---------------------------