diff options
Diffstat (limited to 'jjb/functest/xtesting-pi.yaml')
-rw-r--r-- | jjb/functest/xtesting-pi.yaml | 431 |
1 files changed, 431 insertions, 0 deletions
diff --git a/jjb/functest/xtesting-pi.yaml b/jjb/functest/xtesting-pi.yaml new file mode 100644 index 000000000..f27f19354 --- /dev/null +++ b/jjb/functest/xtesting-pi.yaml @@ -0,0 +1,431 @@ +--- +- xtesting-pi-jobs: &xtesting-pi-jobs + name: 'xtesting-pi-jobs' + current-parameters: true + +- xtesting-pi-params: &xtesting-pi-params + name: 'xtesting-pi-params' + repo: 'ollivier' + port: + tag: + - latest: + branch: master + slave: lf-virtual1 + - kali: + branch: stable/kali + slave: lf-virtual1 + - jerma: + branch: stable/jerma + slave: lf-virtual1 + - iruya: + branch: stable/iruya + slave: lf-virtual1 + - hunter: + branch: stable/hunter + slave: lf-virtual1 + - arm-latest: + branch: master + slave: lf-virtual1 + - arm-kali: + branch: stable/kali + slave: lf-virtual1 + - arm-jerma: + branch: stable/jerma + slave: lf-virtual1 + - arm-iruya: + branch: stable/iruya + slave: lf-virtual1 + - arm-hunter: + branch: stable/hunter + slave: lf-virtual1 + - arm64-latest: + branch: master + slave: lf-virtual1 + - arm64-kali: + branch: stable/kali + slave: lf-virtual1 + - arm64-jerma: + branch: stable/jerma + slave: lf-virtual1 + - arm64-iruya: + branch: stable/iruya + slave: lf-virtual1 + - arm64-hunter: + branch: stable/hunter + slave: lf-virtual1 + +- parameter: + name: xtesting-pi-slave + parameters: + - label: + name: slave + default: '{slave}' + +- parameter: + name: xtesting-pi-build_tag + parameters: + - random-string: + name: build_tag + +- parameter: + name: xtesting-pi-branch + parameters: + - string: + name: branch + default: '{branch}' + +- parameter: + name: xtesting-pi-DEBUG + parameters: + - string: + name: DEBUG + default: 'true' + +- xtesting-pi-containers: &xtesting-pi-containers + name: 'xtesting-pi-containers' + repo: '{repo}' + port: '{port}' + container: '{container}' + tag: '{tag}' + +- xtesting-pi-run-containers: &xtesting-pi-run-containers + name: 'xtesting-pi-run-containers' + <<: *xtesting-pi-containers + test: '{test}' + privileged: '{privileged}' + network: '{network}' + +- builder: + name: xtesting-pi-pull-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 pull $image + +- builder: + name: xtesting-pi-run-containers + builders: + - shell: | + set +x + [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/* || true + if [ "{repo}" = "_" ]; then + image={container}:{tag} + elif [ "{port}" = "None" ]; then + image={repo}/{container}:{tag} + else + image={repo}:{port}/{container}:{tag} + fi + sudo docker run --rm \ + --privileged={privileged} \ + --network={network} \ + -e S3_ENDPOINT_URL=https://storage.googleapis.com \ + -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \ + -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \ + -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \ + -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \ + -e NODE_NAME=$slave \ + -e BUILD_TAG=$BUILD_TAG \ + -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \ + -e DEBUG=$DEBUG \ + -v /home/opnfv/xtesting/.boto:/root/.boto \ + $image run_tests -t {test} -p -r + +- builder: + name: xtesting-pi-remove-images + 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 rmi $image || true + + +- job-template: + name: 'xtesting-pi-{repo}-{container}-{tag}-pull' + parameters: + - xtesting-pi-slave: + slave: '{slave}' + builders: + - xtesting-pi-pull-containers: + <<: *xtesting-pi-containers + +- project: + name: 'xtesting-pi-ollivier-xtesting-pull' + <<: *xtesting-pi-params + container: 'xtesting' + jobs: + - 'xtesting-pi-{repo}-{container}-{tag}-pull' + +- project: + name: 'xtesting-pi-ollivier-xtesting-mts-pull' + <<: *xtesting-pi-params + container: 'xtesting-mts' + exclude: + - tag: hunter + - tag: iruya + - tag: jerma + - tag: kali + - tag: arm-hunter + - tag: arm-iruya + - tag: arm-jerma + - tag: arm-kali + - tag: arm-latest + - tag: arm64-hunter + - tag: arm64-iruya + - tag: arm64-jerma + - tag: arm64-kali + jobs: + - 'xtesting-pi-{repo}-{container}-{tag}-pull' + +- job-template: + name: 'xtesting-pi-{repo}-{container}-{tag}-rmi' + parameters: + - xtesting-pi-slave: + slave: '{slave}' + builders: + - xtesting-pi-remove-images: + <<: *xtesting-pi-containers + +- project: + name: 'xtesting-pi-ollivier-xtesting-rmi' + <<: *xtesting-pi-params + container: 'xtesting' + jobs: + - 'xtesting-pi-{repo}-{container}-{tag}-rmi' + +- project: + name: 'xtesting-pi-ollivier-xtesting-mts-rmi' + <<: *xtesting-pi-params + container: 'xtesting-mts' + exclude: + - tag: hunter + - tag: iruya + - tag: jerma + - tag: kali + - tag: arm-hunter + - tag: arm-iruya + - tag: arm-jerma + - tag: arm-kali + - tag: arm-latest + - tag: arm64-hunter + - tag: arm64-iruya + - tag: arm64-jerma + - tag: arm64-kali + jobs: + - 'xtesting-pi-{repo}-{container}-{tag}-rmi' + +- job-template: + name: 'xtesting-pi-{repo}-{container}-{tag}-{test}-run' + parameters: + - xtesting-pi-slave: + slave: '{slave}' + - xtesting-pi-build_tag: + build_tag: '' + - xtesting-pi-DEBUG: + DEBUG: 'true' + builders: + - xtesting-pi-run-containers: + <<: *xtesting-pi-run-containers + +- project: + name: 'xtesting-pi-ollivier-xtesting' + <<: *xtesting-pi-params + container: 'xtesting' + test: + - first + - second + - third + - fourth + - fifth + - sixth + exclude: + - tag: hunter + test: sixth + - tag: iruya + test: sixth + - tag: arm-hunter + test: sixth + - tag: arm-iruya + test: sixth + - tag: arm64-hunter + test: sixth + - tag: arm64-iruya + test: sixth + privileged: 'false' + network: bridge + jobs: + - 'xtesting-pi-{repo}-{container}-{tag}-{test}-run' + +- project: + name: 'xtesting-pi-ollivier-xtesting-mts' + <<: *xtesting-pi-params + container: 'xtesting-mts' + test: + - seventh + exclude: + - tag: hunter + test: seventh + - tag: iruya + test: seventh + - tag: jerma + test: seventh + - tag: kali + test: seventh + - tag: arm-hunter + test: seventh + - tag: arm-iruya + test: seventh + - tag: arm-jerma + test: seventh + - tag: arm-kali + test: seventh + - tag: arm-latest + test: seventh + - tag: arm64-hunter + test: seventh + - tag: arm64-iruya + test: seventh + - tag: arm64-jerma + test: seventh + - tag: arm64-kali + test: seventh + privileged: 'false' + network: bridge + jobs: + - 'xtesting-pi-{repo}-{container}-{tag}-{test}-run' + + +- builder: + name: xtesting-pi-zip + builders: + - shell: | + set +x + [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/* || true + if [ "{repo}" = "_" ]; then + image={container}:{tag} + elif [ "{port}" = "None" ]; then + image={repo}/{container}:{tag} + else + image={repo}:{port}/{container}:{tag} + fi + sudo docker run --rm \ + -e S3_ENDPOINT_URL=https://storage.googleapis.com \ + -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting \ + -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting \ + -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \ + -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \ + -e BUILD_TAG=$BUILD_TAG \ + -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \ + -e DEBUG=$DEBUG \ + -v /home/opnfv/xtesting/.boto:/root/.boto \ + $image zip_campaign + +- job-template: + name: 'xtesting-pi-{tag}-zip' + parameters: + - xtesting-pi-slave: + slave: '{slave}' + - xtesting-pi-build_tag: + build_tag: '' + - xtesting-pi-DEBUG: + DEBUG: 'true' + builders: + - xtesting-pi-zip: + <<: *xtesting-pi-containers + +- project: + name: 'xtesting-pi-{tag}-zip' + <<: *xtesting-pi-params + container: 'xtesting' + jobs: + - 'xtesting-pi-{tag}-zip' + +- job-template: + name: 'xtesting-pi-{tag}-daily' + project-type: multijob + triggers: + - timed: '@daily' + parameters: + - xtesting-pi-slave: + slave: '{slave}' + - xtesting-pi-build_tag: + build_tag: '' + - xtesting-pi-DEBUG: + DEBUG: 'true' + properties: + - build-blocker: + use-build-blocker: true + blocking-level: 'NODE' + blocking-jobs: + - '^xtesting-pi-{tag}-(daily|check|gate)$' + builders: + - multijob: + name: remove former images + projects: + - name: 'xtesting-pi-ollivier-xtesting-{tag}-rmi' + <<: *xtesting-pi-jobs + - name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-rmi' + <<: *xtesting-pi-jobs + - multijob: + name: pull containers + projects: + - name: 'xtesting-pi-ollivier-xtesting-{tag}-pull' + <<: *xtesting-pi-jobs + - name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-pull' + <<: *xtesting-pi-jobs + - multijob: + name: ollivier/xtesting:{tag} + projects: + - name: 'xtesting-pi-ollivier-xtesting-{tag}-first-run' + <<: *xtesting-pi-jobs + - name: 'xtesting-pi-ollivier-xtesting-{tag}-second-run' + <<: *xtesting-pi-jobs + - name: 'xtesting-pi-ollivier-xtesting-{tag}-third-run' + <<: *xtesting-pi-jobs + - name: 'xtesting-pi-ollivier-xtesting-{tag}-fourth-run' + <<: *xtesting-pi-jobs + - name: 'xtesting-pi-ollivier-xtesting-{tag}-fifth-run' + <<: *xtesting-pi-jobs + - name: 'xtesting-pi-ollivier-xtesting-{tag}-sixth-run' + <<: *xtesting-pi-jobs + - multijob: + name: ollivier/xtesting-mts:{tag} + projects: + - name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-seventh-run' + <<: *xtesting-pi-jobs + - multijob: + name: dump all campaign data + projects: + - name: 'xtesting-pi-{tag}-zip' + <<: *xtesting-pi-jobs + + +- project: + name: 'xtesting-pi' + <<: *xtesting-pi-params + jobs: + - 'xtesting-pi-{tag}-daily' + +- view: + name: xtesting-pi + view-type: list + columns: + - status + - weather + - job + - last-success + - last-failure + - last-duration + regex: ^xtesting-pi-(arm.*-|amd64-)*[a-z]+-daily$ |