Add Xtesting Jerma jobs
[releng.git] / jjb / functest / xtesting.yaml
index 8e2b1e8..cc9ec07 100644 (file)
     tag:
       - latest:
           branch: master
+          slave: lf-virtual1
+      - jerma:
+          branch: stable/jerma
+          slave: lf-virtual1
+      - iruya:
+          branch: stable/iruya
+          slave: lf-virtual1
       - hunter:
           branch: stable/hunter
-      - gambia:
-          branch: stable/gambia
+          slave: lf-virtual1
 
 - parameter:
     name: xtesting-slave
     parameters:
       - label:
           name: slave
-          default: lf-build2
+          default: '{slave}'
 
 - parameter:
     name: xtesting-branch
           else
             image={repo}:{port}/{container}:{tag}
           fi
+          if [ "{ref_arg}" = "None" ]; then
+            build_arg=""
+          else
+            build_arg="--build-arg {ref_arg}={ref}"
+          fi
           cd {path}
-          sudo docker build --build-arg {ref_arg}={ref} \
+          sudo docker build $build_arg \
             --pull=false --no-cache --force-rm=true \
             -t $image .
 
           fi
           sudo docker run --rm \
             -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
+            -e DEBUG=true \
             $image run_tests -t {test}
           res=$?
           gsutil -m cp -r $WORKSPACE/ \
             - '{ref}'
 
 - job-template:
-    name: '{repo}-{container}-{tag}-pull'
+    name: 'xtesting-{repo}-{container}-{tag}-pull'
     parameters:
-      - xtesting-slave
+      - xtesting-slave:
+          slave: '{slave}'
     builders:
       - xtesting-pull-containers:
           <<: *xtesting-containers
 
 - project:
-    name: 'opnfv-xtesting-pull'
+    name: 'xtesting-opnfv-xtesting-pull'
     <<: *xtesting-params
     container: 'xtesting'
     jobs:
-      - '{repo}-{container}-{tag}-pull'
+      - 'xtesting-{repo}-{container}-{tag}-pull'
 
 - job-template:
-    name: '{repo}-{container}-{tag}-rmi'
+    name: 'xtesting-{repo}-{container}-{tag}-rmi'
     parameters:
-      - xtesting-slave
+      - xtesting-slave:
+          slave: '{slave}'
     builders:
       - xtesting-remove-images:
           <<: *xtesting-containers
 
 - project:
-    name: 'opnfv-xtesting-rmi'
+    name: 'xtesting-opnfv-xtesting-rmi'
     <<: *xtesting-params
     container: 'xtesting'
     jobs:
-      - '{repo}-{container}-{tag}-rmi'
+      - 'xtesting-{repo}-{container}-{tag}-rmi'
 
 - job-template:
-    name: '{repo}-{container}-{tag}-{test}-run'
+    name: 'xtesting-{repo}-{container}-{tag}-{test}-run'
     parameters:
-      - xtesting-slave
+      - xtesting-slave:
+          slave: '{slave}'
     builders:
       - xtesting-run-containers:
           <<: *xtesting-run-containers
 
 - project:
-    name: 'opnfv-xtesting'
+    name: 'xtesting-opnfv-xtesting'
     <<: *xtesting-params
     container: 'xtesting'
     test:
       - third
       - fourth
       - fifth
+      - sixth
+    exclude:
+      - tag: hunter
+        test: sixth
+      - tag: iruya
+        test: sixth
     jobs:
-      - '{repo}-{container}-{tag}-{test}-run'
+      - 'xtesting-{repo}-{container}-{tag}-{test}-run'
 
 - job-template:
     name: 'xtesting-{tag}-daily'
     triggers:
       - timed: '@daily'
     parameters:
-      - xtesting-slave
+      - xtesting-slave:
+          slave: '{slave}'
     properties:
       - build-blocker:
           use-build-blocker: true
           blocking-level: 'NODE'
           blocking-jobs:
-            - '^xtesting-.*-(daily|check|gate)$'
+            - '^xtesting-{tag}-(daily|check|gate)$'
     builders:
       - multijob:
           name: remove former images
           projects:
-            - name: 'opnfv-xtesting-{tag}-rmi'
+            - name: 'xtesting-opnfv-xtesting-{tag}-rmi'
               <<: *xtesting-jobs
       - multijob:
           name: pull containers
           projects:
-            - name: 'opnfv-xtesting-{tag}-pull'
+            - name: 'xtesting-opnfv-xtesting-{tag}-pull'
               <<: *xtesting-jobs
       - multijob:
           name: opnfv/xtesting:{tag}
           projects:
-            - name: 'opnfv-xtesting-{tag}-first-run'
+            - name: 'xtesting-opnfv-xtesting-{tag}-first-run'
+              <<: *xtesting-jobs
+            - name: 'xtesting-opnfv-xtesting-{tag}-second-run'
               <<: *xtesting-jobs
-            - name: 'opnfv-xtesting-{tag}-second-run'
+            - name: 'xtesting-opnfv-xtesting-{tag}-third-run'
               <<: *xtesting-jobs
-            - name: 'opnfv-xtesting-{tag}-third-run'
+            - name: 'xtesting-opnfv-xtesting-{tag}-fourth-run'
               <<: *xtesting-jobs
-            - name: 'opnfv-xtesting-{tag}-fourth-run'
+            - name: 'xtesting-opnfv-xtesting-{tag}-fifth-run'
               <<: *xtesting-jobs
-            - name: 'opnfv-xtesting-{tag}-fifth-run'
+            - name: 'xtesting-opnfv-xtesting-{tag}-sixth-run'
               <<: *xtesting-jobs
 
 - job-template:
-    name: '{repo}-{container}-{tag}-gate'
+    name: 'xtesting-{repo}-{container}-{tag}-gate'
     parameters:
-      - xtesting-slave
+      - xtesting-slave:
+          slave: '{slave}'
     scm:
       - xtesting-scm:
           ref: $GERRIT_REFSPEC
           ref: $GERRIT_REFSPEC
 
 - job-template:
-    name: '{repo}-{container}-{tag}-check'
+    name: 'xtesting-{repo}-{container}-{tag}-check'
     parameters:
-      - xtesting-slave
+      - xtesting-slave:
+          slave: '{slave}'
       - xtesting-branch:
           branch: '{branch}'
     scm:
           ref: $branch
 
 - project:
-    name: '_-alpine-3.8-rmi'
+    name: 'xtesting-_-alpine-3.10-rmi'
     repo: _
     port:
     container: alpine
-    tag: 3.8
+    tag: '3.10'
+    slave: master
     jobs:
-      - '{repo}-{container}-{tag}-rmi'
+      - 'xtesting-{repo}-{container}-{tag}-rmi'
 
 - project:
-    name: '_-alpine-3.8-pull'
+    name: 'xtesting-_-alpine-3.10-pull'
     repo: _
     port:
     container: alpine
-    tag: 3.8
+    tag: '3.10'
+    slave: master
     jobs:
-      - '{repo}-{container}-{tag}-pull'
+      - 'xtesting-{repo}-{container}-{tag}-pull'
 
 - project:
-    name: opnfv-xtesting-{tag}-build
+    name: xtesting-opnfv-xtesting-{tag}-build
     <<: *xtesting-params
     container: xtesting
     ref_arg: BRANCH
     path: docker
     jobs:
-      - '{repo}-{container}-{tag}-gate'
-      - '{repo}-{container}-{tag}-check'
+      - 'xtesting-{repo}-{container}-{tag}-gate'
+      - 'xtesting-{repo}-{container}-{tag}-check'
 
 - job-template:
     name: 'xtesting-{tag}-check'
     project-type: multijob
     parameters:
-      - xtesting-slave
+      - xtesting-slave:
+          slave: '{slave}'
       - xtesting-branch:
           branch: '{branch}'
     properties:
           use-build-blocker: true
           blocking-level: 'NODE'
           blocking-jobs:
-            - '^xtesting-.*-(daily|check|gate)$'
+            - '^xtesting-{tag}-(daily|check|gate)$'
     builders:
       - multijob:
           name: remove former images
           projects:
-            - name: 'opnfv-xtesting-{tag}-rmi'
+            - name: 'xtesting-opnfv-xtesting-{tag}-rmi'
               <<: *xtesting-jobs
       - multijob:
           name: remove dependencies
           projects:
-            - name: '_-alpine-3.8-rmi'
+            - name: 'xtesting-_-alpine-3.10-rmi'
               <<: *xtesting-jobs
       - multijob:
           name: pull dependencies
           projects:
-            - name: '_-alpine-3.8-pull'
+            - name: 'xtesting-_-alpine-3.10-pull'
               <<: *xtesting-jobs
       - multijob:
-          name: opnfv/functest-xtesting
+          name: opnfv/xtesting
           projects:
-            - name: 'opnfv-xtesting-{tag}-check'
+            - name: 'xtesting-opnfv-xtesting-{tag}-check'
               <<: *xtesting-jobs
       - multijob:
           name: opnfv/xtesting:{tag}
           projects:
-            - name: 'opnfv-xtesting-{tag}-first-run'
+            - name: 'xtesting-opnfv-xtesting-{tag}-first-run'
               <<: *xtesting-jobs
-            - name: 'opnfv-xtesting-{tag}-second-run'
+            - name: 'xtesting-opnfv-xtesting-{tag}-second-run'
               <<: *xtesting-jobs
-            - name: 'opnfv-xtesting-{tag}-third-run'
+            - name: 'xtesting-opnfv-xtesting-{tag}-third-run'
               <<: *xtesting-jobs
-            - name: 'opnfv-xtesting-{tag}-fourth-run'
+            - name: 'xtesting-opnfv-xtesting-{tag}-fourth-run'
               <<: *xtesting-jobs
-            - name: 'opnfv-xtesting-{tag}-fifth-run'
+            - name: 'xtesting-opnfv-xtesting-{tag}-fifth-run'
+              <<: *xtesting-jobs
+            - name: 'xtesting-opnfv-xtesting-{tag}-sixth-run'
               <<: *xtesting-jobs
 
 - trigger:
       - xtesting-patchset-created:
           branch: '{branch}'
     parameters:
-      - xtesting-slave
+      - xtesting-slave:
+          slave: '{slave}'
     properties:
       - build-blocker:
           use-build-blocker: true
           blocking-level: 'NODE'
           blocking-jobs:
-            - '^xtesting-.*-(daily|check|gate)$'
+            - '^xtesting-{tag}-(daily|check|gate)$'
     builders:
       - multijob:
           name: remove former images
           projects:
-            - name: 'opnfv-xtesting-{tag}-rmi'
+            - name: 'xtesting-opnfv-xtesting-{tag}-rmi'
               <<: *xtesting-jobs
       - multijob:
           name: remove dependencies
           projects:
-            - name: '_-alpine-3.8-rmi'
+            - name: 'xtesting-_-alpine-3.10-rmi'
               <<: *xtesting-jobs
       - multijob:
           name: pull dependencies
           projects:
-            - name: '_-alpine-3.8-pull'
+            - name: 'xtesting-_-alpine-3.10-pull'
               <<: *xtesting-jobs
       - multijob:
-          name: opnfv/functest-xtesting
+          name: opnfv/xtesting
           projects:
-            - name: 'opnfv-xtesting-{tag}-gate'
+            - name: 'xtesting-opnfv-xtesting-{tag}-gate'
               <<: *xtesting-jobs
       - multijob:
           name: opnfv/xtesting:{tag}
           projects:
-            - name: 'opnfv-xtesting-{tag}-first-run'
+            - name: 'xtesting-opnfv-xtesting-{tag}-first-run'
+              <<: *xtesting-jobs
+            - name: 'xtesting-opnfv-xtesting-{tag}-second-run'
               <<: *xtesting-jobs
-            - name: 'opnfv-xtesting-{tag}-second-run'
+            - name: 'xtesting-opnfv-xtesting-{tag}-third-run'
               <<: *xtesting-jobs
-            - name: 'opnfv-xtesting-{tag}-third-run'
+            - name: 'xtesting-opnfv-xtesting-{tag}-fourth-run'
               <<: *xtesting-jobs
-            - name: 'opnfv-xtesting-{tag}-fourth-run'
+            - name: 'xtesting-opnfv-xtesting-{tag}-fifth-run'
               <<: *xtesting-jobs
-            - name: 'opnfv-xtesting-{tag}-fifth-run'
+            - name: 'xtesting-opnfv-xtesting-{tag}-sixth-run'
               <<: *xtesting-jobs
 
 - project:
       - last-success
       - last-failure
       - last-duration
-    regex: ^xtesting-.*-(daily|check|gate)$
+    regex: ^xtesting-[a-z]+-(daily|check|gate)$