Prepare Functest Leguer project jobs
[releng.git] / jjb / functest / xtesting-docker.yaml
index 88416bb..836aaa2 100644 (file)
       - master:
           branch: '{stream}'
           disabled: false
-      - hunter:
+      - leguer:
+          branch: 'stable/{stream}'
+          disabled: false
+      - kali:
           branch: 'stable/{stream}'
           disabled: false
-      - gambia:
+      - jerma:
           branch: 'stable/{stream}'
           disabled: false
-      - fraser:
+      - iruya:
+          branch: 'stable/{stream}'
+          disabled: false
+      - hunter:
           branch: 'stable/{stream}'
           disabled: false
 
     arch_tag:
       - 'amd64':
-          slave_label: 'opnfv-build-ubuntu'
+          slave_label: 'lf-build2'
       - 'arm64':
           slave_label: 'opnfv-build-ubuntu-arm'
 
+    image:
+      - 'core'
+      - 'mts'
+
+    exclude:
+      - stream: 'kali'
+        image: 'mts'
+      - stream: 'jerma'
+        image: 'mts'
+      - stream: 'iruya'
+        image: 'mts'
+      - stream: 'hunter'
+        image: 'mts'
+
     # settings for jobs run in multijob phases
     build-job-settings: &build-job-settings
       current-parameters: false
@@ -53,8 +73,8 @@
     # yamllint enable rule:key-duplicates
     jobs:
       - "xtesting-docker-{stream}"
-      - "xtesting-docker-build-{arch_tag}-{stream}"
-      - "xtesting-docker-manifest-{stream}"
+      - "xtesting-{image}-docker-build-{arch_tag}-{stream}"
+      - "xtesting-{image}-docker-manifest-{stream}"
 
 ########################
 # job templates
@@ -70,7 +90,7 @@
       - xtesting-job-parameters:
           project: '{project}'
           branch: '{branch}'
-          slave_label: 'opnfv-build-ubuntu'
+          slave_label: 'lf-build2'
           arch_tag: 'amd64'
 
     properties:
           name: 'build xtesting images'
           execution-type: PARALLEL
           projects:
-            - name: 'xtesting-docker-build-amd64-{stream}'
+            - name: 'xtesting-core-docker-build-amd64-{stream}'
               <<: *build-job-settings
-            - name: 'xtesting-docker-build-arm64-{stream}'
+            - name: 'xtesting-core-docker-build-arm64-{stream}'
               <<: *build-job-settings
       - multijob:
           name: 'publish xtesting manifests'
           execution-type: PARALLEL
           projects:
-            - name: 'xtesting-docker-manifest-{stream}'
+            - name: 'xtesting-core-docker-manifest-{stream}'
+              <<: *manifest-job-settings
+      - multijob:
+          name: 'build xtesting-mts images'
+          execution-type: PARALLEL
+          projects:
+            - name: 'xtesting-mts-docker-build-amd64-{stream}'
+              <<: *build-job-settings
+            - name: 'xtesting-mts-docker-build-arm64-{stream}'
+              <<: *build-job-settings
+      - multijob:
+          name: 'publish xtesting-mts manifests'
+          execution-type: PARALLEL
+          projects:
+            - name: 'xtesting-mts-docker-manifest-{stream}'
               <<: *manifest-job-settings
 
+
     publishers:
       - 'xtesting-amd64-recipients'
       - 'xtesting-arm64-recipients'
 
 - job-template:
-    name: 'xtesting-docker-build-{arch_tag}-{stream}'
+    name: 'xtesting-{image}-docker-build-{arch_tag}-{stream}'
     disabled: '{obj:disabled}'
     parameters:
       - xtesting-job-parameters:
     builders:
       - shell: |
           #!/bin/bash -ex
-          sudo arch={arch_tag} bash ./build.sh
+          case "{arch_tag}" in
+          "arm64")
+              sudo arch=arm64 amd64_dirs= arm64_dirs=docker/{image} arm_dirs= bash ./build.sh ;;
+          *)
+              sudo arch=amd64 amd64_dirs=docker/{image} arm64_dirs= arm_dirs= bash ./build.sh ;;
+          esac
           exit $?
 
 - job-template:
-    name: 'xtesting-docker-manifest-{stream}'
+    name: 'xtesting-{image}-docker-manifest-{stream}'
 
     parameters:
       - project-parameter:
           branch: '{branch}'
       - label:
           name: SLAVE_LABEL
-          default: 'opnfv-build-ubuntu'
+          default: 'lf-build2'
           description: 'Slave label on Jenkins'
           all-nodes: false
           node-eligibility: 'ignore-offline'
       - string:
           name: REPO
           default: "opnfv"
-          description: "Repository name for functest images"
+          description: "Repository name for xtesting images"
 
 
     disabled: '{obj:disabled}'
           *)
               tag="{stream}" ;;
           esac
+          case "{image}" in
+          "core")
+              img="" ;;
+          *)
+              img="-{image}" ;;
+          esac
           sudo manifest-tool push from-args \
               --platforms linux/amd64,linux/arm64 \
-              --template $REPO/xtesting:ARCH-$tag \
-              --target $REPO/xtesting:$tag
+              --template $REPO/xtesting$img:ARCH-$tag \
+              --target $REPO/xtesting$img:$tag
           exit $?
 
 - parameter:
       - string:
           name: REPO
           default: "opnfv"
-          description: "Repository name for functest images"
+          description: "Repository name for xtesting images"
 
 # publisher macros
 - publisher: