+ - multijob:
+ name: opnfv/xtesting-mts:{tag}
+ projects:
+ - name: 'xtesting-opnfv-xtesting-mts-{tag}-seventh-run'
+ <<: *xtesting-jobs
+
+- builder:
+ name: xtesting-push-containers
+ builders:
+ - shell: |
+ set +x
+ if [ "{repo}" = "_" ]; then
+ image={container}:{tag}
+ elif [ "{port}" = "None" ]; then
+ image={repo}/{container}:{tag}
+ else
+ image={repo}:{port}/{container}:{tag}
+ fi
+ sudo docker push $image
+
+- trigger:
+ name: xtesting-commit
+ triggers:
+ - pollscm:
+ cron: "*/30 * * * *"
+
+- job-template:
+ name: 'xtesting-{repo}-{container}-{tag}-build'
+ parameters:
+ - xtesting-slave:
+ slave: '{slave}'
+ scm:
+ - xtesting-scm:
+ ref: '{branch}'
+ builders:
+ - xtesting-build-containers:
+ <<: *xtesting-build-containers
+ ref: '{branch}'
+ - xtesting-push-containers:
+ <<: *xtesting-build-containers
+ ref: '{branch}'
+
+- project:
+ name: xtesting-opnfv-xtesting-{tag}-build
+ <<: *xtesting-params
+ container: xtesting
+ ref_arg: BRANCH
+ path: docker/core
+ jobs:
+ - 'xtesting-{repo}-{container}-{tag}-build'
+
+- project:
+ name: xtesting-opnfv-xtesting-mts-{tag}-build
+ <<: *xtesting-params
+ container: xtesting-mts
+ ref_arg: BRANCH
+ path: docker/mts
+ jobs:
+ - 'xtesting-{repo}-{container}-{tag}-build'
+
+
+- job-template:
+ name: 'xtesting-{tag}-docker'
+ project-type: multijob
+ triggers:
+ - xtesting-commit
+ scm:
+ - xtesting-scm:
+ ref: '{branch}'
+ parameters:
+ - xtesting-slave:
+ slave: '{slave}'
+ - xtesting-DEBUG:
+ DEBUG: 'true'
+ builders:
+ - multijob:
+ name: remove dependency
+ projects:
+ - name: 'xtesting-{repo}-{tag}-dep-rmi'
+ <<: *xtesting-jobs
+ - multijob:
+ name: pull dependency
+ projects:
+ - name: 'xtesting-{repo}-{tag}-dep-pull'
+ <<: *xtesting-jobs
+ - multijob:
+ name: opnfv/xtesting
+ projects:
+ - name: 'xtesting-opnfv-xtesting-{tag}-build'
+ <<: *xtesting-jobs
+ - multijob:
+ name: opnfv/xtesting-mts
+ projects:
+ - name: 'xtesting-opnfv-xtesting-mts-{tag}-build'
+ <<: *xtesting-jobs
+
+- builder:
+ name: xtesting-trivy
+ builders:
+ - shell: |
+ curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sudo sh -s -- -b .
+ if [ "{repo}" = "_" ]; then
+ image={container}:{tag}
+ elif [ "{port}" = "None" ]; then
+ image={repo}/{container}:{tag}
+ else
+ image={repo}:{port}/{container}:{tag}
+ fi
+ ./trivy --exit-code 1 $image
+
+- job-template:
+ name: 'xtesting-{repo}-{container}-{tag}-trivy'
+ parameters:
+ - xtesting-slave:
+ slave: '{slave}'
+ builders:
+ - xtesting-trivy:
+ <<: *xtesting-containers
+
+- project:
+ name: 'xtesting-opnfv-xtesting-trivy'
+ <<: *xtesting-params
+ container: 'xtesting'
+ jobs:
+ - 'xtesting-{repo}-{container}-{tag}-trivy'
+- project:
+ name: 'xtesting-opnfv-xtesting-mts-trivy'
+ <<: *xtesting-params
+ container: 'xtesting-mts'
+ jobs:
+ - 'xtesting-{repo}-{container}-{tag}-trivy'