From 9341d2e37026c0d65ede57cd417e91db93ea2e03 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Ollivier?= Date: Wed, 2 Jan 2019 01:15:20 +0100 Subject: [PATCH] Publish Xtesting daily jobs MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit They verify the rolling containers. xtesting.yaml has been generated via collivier.xtesting (ansible role). Change-Id: Idf7cce42bee15174e4242891a102f6599026b3b7 Signed-off-by: Cédric Ollivier --- jjb/functest/xtesting.yaml | 150 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 jjb/functest/xtesting.yaml diff --git a/jjb/functest/xtesting.yaml b/jjb/functest/xtesting.yaml new file mode 100644 index 000000000..0a0e60514 --- /dev/null +++ b/jjb/functest/xtesting.yaml @@ -0,0 +1,150 @@ +--- +- xtesting-jobs: &xtesting-jobs + name: 'xtesting-jobs' + current-parameters: true + +- xtesting-params: &xtesting-params + name: 'xtesting-params' + tag: + - latest + - gambia + - hunter + +- parameter: + name: xtesting-slave + parameters: + - label: + name: slave + default: opnfv-build-ubuntu + +- job-template: + name: '{repo}-{container}-{tag}-pull' + parameters: + - xtesting-slave + builders: + - shell: | + if [ "{port}" = "None" ]; then + image={repo}/{container}:{tag} + else + image={repo}:{port}/{container}:{tag} + fi + sudo docker pull $image + +- project: + name: 'opnfv-xtesting-pull' + <<: *xtesting-params + repo: 'opnfv' + port: + container: 'xtesting' + jobs: + - '{repo}-{container}-{tag}-pull' + +- job-template: + name: '{repo}-{container}-{tag}-rmi' + parameters: + - xtesting-slave + builders: + - shell: sudo docker rmi {repo}/{container}:{tag} || true + +- project: + name: 'opnfv-xtesting-rmi' + <<: *xtesting-params + repo: 'opnfv' + port: + container: 'xtesting' + jobs: + - '{repo}-{container}-{tag}-rmi' + +- job-template: + name: '{repo}-{container}-{tag}-{test}-run' + parameters: + - xtesting-slave + builders: + - shell: | + set +ex + rm -rf /var/jenkins_home/workspace/$JOB_NAME/* + if [ "{port}" = "None" ]; then + image={repo}/{container}:{tag} + else + image={repo}:{port}/{container}:{tag} + fi + sudo docker run --rm \ + --link testapi:testapi \ + -v /data/jenkins/workspace/$JOB_NAME/results:/var/lib/xtesting/results \ + $image run_tests -t {test} + res=$? + gsutil -m cp -r /var/jenkins_home/workspace/$JOB_NAME/ \ + gs://artifacts.opnfv.org/xtesting/$JOB_NAME-$BUILD_ID > /dev/null + find /var/jenkins_home/workspace/$JOB_NAME/ -type f \ + -printf \ + "http://artifacts.opnfv.org/xtesting/$JOB_NAME-$BUILD_ID/%P\n" + exit $res + +- project: + name: 'opnfv-xtesting' + <<: *xtesting-params + repo: 'opnfv' + port: + container: 'xtesting' + test: + - first + - second + - third + - fourth + - fifth + jobs: + - '{repo}-{container}-{tag}-{test}-run' + +- job-template: + name: 'xtesting-{tag}' + project-type: multijob + triggers: + - timed: '@daily' + parameters: + - xtesting-slave + properties: + - build-blocker: + use-build-blocker: true + blocking-level: 'NODE' + blocking-jobs: + - 'xtesting-.*' + builders: + - multijob: + name: remove former images + projects: + - name: 'opnfv-xtesting-{tag}-rmi' + - multijob: + name: pull containers + projects: + - name: 'opnfv-xtesting-{tag}-pull' + - multijob: + name: opnfv/xtesting:{tag} + projects: + - name: 'opnfv-xtesting-{tag}-first-run' + <<: *xtesting-jobs + - name: 'opnfv-xtesting-{tag}-second-run' + <<: *xtesting-jobs + - name: 'opnfv-xtesting-{tag}-third-run' + <<: *xtesting-jobs + - name: 'opnfv-xtesting-{tag}-fourth-run' + <<: *xtesting-jobs + - name: 'opnfv-xtesting-{tag}-fifth-run' + <<: *xtesting-jobs + +- project: + name: 'xtesting' + <<: *xtesting-params + jobs: + - 'xtesting-{tag}' + +- view: + name: xtesting + view-type: list + columns: + - status + - weather + - job + - last-success + - last-failure + - last-duration + regex: xtesting-.* -- 2.16.6