diff options
-rw-r--r-- | ci/daily.yaml | 32 | ||||
-rw-r--r-- | ci/gate.yaml | 62 | ||||
-rw-r--r-- | ci/globals.yaml | 10 | ||||
-rw-r--r-- | ci/run.yaml | 20 |
4 files changed, 124 insertions, 0 deletions
diff --git a/ci/daily.yaml b/ci/daily.yaml new file mode 100644 index 00000000..3bf90e4c --- /dev/null +++ b/ci/daily.yaml @@ -0,0 +1,32 @@ +--- +- job-template: + name: '{repo}-xtesting-{tag}-pull' + builders: + - shell: docker pull {repo}/xtesting:{tag} + +- project: + name: '{repo}-xtesting-{tag}-pull' + jobs: + - '{repo}-xtesting-{tag}-pull' + +- job-template: + name: '{repo}-xtesting-{tag}-daily' + project-type: multijob + builders: + - multijob: + name: pull container + projects: + - name: '{repo}-xtesting-{tag}-pull' + - multijob: + name: samples + projects: + - name: '{repo}-xtesting-first-{tag}-run' + - name: '{repo}-xtesting-second-{tag}-run' + - name: '{repo}-xtesting-third-{tag}-run' + - name: '{repo}-xtesting-fourth-{tag}-run' + - name: '{repo}-xtesting-fifth-{tag}-run' + +- project: + name: '{repo}-xtesting-{tag}-daily' + jobs: + - '{repo}-xtesting-{tag}-daily' diff --git a/ci/gate.yaml b/ci/gate.yaml new file mode 100644 index 00000000..2fbb02bc --- /dev/null +++ b/ci/gate.yaml @@ -0,0 +1,62 @@ +--- +- xtesting-buildparameters: &xtesting-buildparameters + name: 'xtesting-buildparameters' + parameters: + - string: + name: branch + default: '{branch}' + +- functest-projectparameters: &xtesting-projectparameters + name: 'xtesting-projectparameters' + current-parameters: true + +- scm: + name: xtesting-gerrit + scm: + - git: + url: https://gerrit.opnfv.org/gerrit/functest-xtesting + refspec: '+refs/changes/*:refs/changes/*' + branches: + - ${branch} + +- job-template: + name: '{repo}-xtesting-{tag}-build' + <<: *xtesting-buildparameters + scm: + - xtesting-gerrit + builders: + - shell: | + cd docker + docker build \ + --pull=false --no-cache --force-rm=true \ + --build-arg BRANCH=${{branch}} \ + -t {repo}/xtesting:{tag} . + +- project: + name: '{repo}-xtesting-{tag}-build' + jobs: + - '{repo}-xtesting-{tag}-build' + +- job-template: + name: '{repo}-xtesting-{tag}-gate' + project-type: multijob + <<: *xtesting-buildparameters + builders: + - multijob: + name: build container + projects: + - name: '{repo}-xtesting-{tag}-build' + <<: *xtesting-projectparameters + - multijob: + name: samples + projects: + - name: '{repo}-xtesting-first-{tag}-run' + - name: '{repo}-xtesting-second-{tag}-run' + - name: '{repo}-xtesting-third-{tag}-run' + - name: '{repo}-xtesting-fourth-{tag}-run' + - name: '{repo}-xtesting-fifth-{tag}-run' + +- project: + name: '{repo}-xtesting-{tag}-gate' + jobs: + - '{repo}-xtesting-{tag}-gate' diff --git a/ci/globals.yaml b/ci/globals.yaml new file mode 100644 index 00000000..96e225a7 --- /dev/null +++ b/ci/globals.yaml @@ -0,0 +1,10 @@ +--- +- defaults: + name: global + repo: 'opnfv' + branch: 'stable/fraser' + tag: 'fraser' + +- defaults: + name: xtesting-defaults + prefix: '/home/opnfv/xtesting' diff --git a/ci/run.yaml b/ci/run.yaml new file mode 100644 index 00000000..8b8732b5 --- /dev/null +++ b/ci/run.yaml @@ -0,0 +1,20 @@ +--- +- job-template: + name: '{repo}-xtesting-{test}-{tag}-run' + defaults: 'xtesting-defaults' + builders: + - shell: | + docker run \ + -v {prefix}/results/$JOB_NAME-$BUILD_ID:/var/lib/xtesting/results \ + {repo}/xtesting:{tag} run_tests -t {test} + +- project: + name: '{repo}-xtesting-{test}-{tag}-run' + test: + - first + - second + - third + - fourth + - fifth + jobs: + - '{repo}-xtesting-{test}-{tag}-run' |