aboutsummaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-09-01 22:26:42 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2018-09-02 11:06:27 +0200
commit2b9cd4490fd4f16c09bb1c13a1cbe74b6662d4d4 (patch)
tree233cfb06be42d88fdb6b9338a9dff1fa967b04da /ci
parent4df6d4f7d485970c2f06476bd77ffb925c5d43b3 (diff)
Publish daily and gating jjbs
Change-Id: I1050741ce34e151be30404275670e83fc2a40d1a Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'ci')
-rw-r--r--ci/daily.yaml32
-rw-r--r--ci/gate.yaml62
-rw-r--r--ci/globals.yaml10
-rw-r--r--ci/run.yaml20
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..5fd895d0
--- /dev/null
+++ b/ci/globals.yaml
@@ -0,0 +1,10 @@
+---
+- defaults:
+ name: global
+ repo: 'opnfv'
+ branch: 'master'
+ tag: 'latest'
+
+- 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'