Publish daily and gating jjbs 97/61697/2
authorCédric Ollivier <cedric.ollivier@orange.com>
Sat, 1 Sep 2018 20:26:42 +0000 (22:26 +0200)
committerCédric Ollivier <cedric.ollivier@orange.com>
Sun, 2 Sep 2018 09:11:41 +0000 (11:11 +0200)
Change-Id: I1050741ce34e151be30404275670e83fc2a40d1a
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
(cherry picked from commit 2b9cd4490fd4f16c09bb1c13a1cbe74b6662d4d4)

ci/daily.yaml [new file with mode: 0644]
ci/gate.yaml [new file with mode: 0644]
ci/globals.yaml [new file with mode: 0644]
ci/run.yaml [new file with mode: 0644]

diff --git a/ci/daily.yaml b/ci/daily.yaml
new file mode 100644 (file)
index 0000000..3bf90e4
--- /dev/null
@@ -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 (file)
index 0000000..2fbb02b
--- /dev/null
@@ -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 (file)
index 0000000..96e225a
--- /dev/null
@@ -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 (file)
index 0000000..8b8732b
--- /dev/null
@@ -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'