Avoid duplicating jjb names 97/61397/2
authorCédric Ollivier <cedric.ollivier@orange.com>
Sun, 26 Aug 2018 09:30:11 +0000 (11:30 +0200)
committerCédric Ollivier <cedric.ollivier@orange.com>
Mon, 27 Aug 2018 19:11:38 +0000 (21:11 +0200)
It allows loading functest and functest-kubernetes jjbs in one
Jenkins.

Change-Id: Ia52e84583bc25aad0d1508096b536cbd5585d261
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
(cherry picked from commit 890bc75c29ef98fe2eb0dd8e456ad6eafa9d26a1)

ci/daily.yaml
ci/gate.yaml
ci/globals.yaml
ci/run.yaml

index ee6afb2..3d6e99f 100644 (file)
@@ -1,20 +1,20 @@
 ---
 - job-template:
-    name: '{repo}-{container}-{tag}-pull'
+    name: '{repo}-functest-{container}-{tag}-pull'
     builders:
-      - shell: docker pull {repo}/{container}:{tag}
+      - shell: docker pull {repo}/functest-{container}:{tag}
 
 - project:
-    name: '{repo}-{container}-{tag}-pull'
+    name: '{repo}-functest-{container}-{tag}-pull'
     container:
-      - functest-healthcheck
-      - functest-smoke
-      - functest-components
-      - functest-vnf
-      - functest-features
-      - functest-parser
+      - healthcheck
+      - smoke
+      - components
+      - vnf
+      - features
+      - parser
     jobs:
-      - '{repo}-{container}-{tag}-pull'
+      - '{repo}-functest-{container}-{tag}-pull'
 
 - job-template:
     name: '{repo}-functest-{tag}-pull'
index a6e38d4..5501c02 100644 (file)
@@ -1,17 +1,17 @@
 ---
-- buildparameters: &buildparameters
-    name: 'buildparameters'
+- functest-buildparameters: &functest-buildparameters
+    name: 'functest-buildparameters'
     parameters:
       - string:
           name: branch
           default: '{branch}'
 
-- projectparameters: &projectparameters
-    name: 'projectparameters'
+- functest-projectparameters: &functest-projectparameters
+    name: 'functest-projectparameters'
     current-parameters: true
 
 - scm:
-    name: gerrit
+    name: functest-gerrit
     scm:
       - git:
           url: https://gerrit.opnfv.org/gerrit/functest
             - ${branch}
 
 - job-template:
-    name: '{repo}-{container}-{tag}-build'
-    <<: *buildparameters
+    name: '{repo}-functest-{container}-{tag}-build'
+    <<: *functest-buildparameters
     scm:
-      - gerrit
+      - functest-gerrit
     builders:
       - shell: |
           cd docker/$(echo {container} |cut -d\- -f 2)
           docker build \
             --pull=false --no-cache --force-rm=true \
             --build-arg BRANCH=${{branch}} \
-            -t {repo}/{container}:{tag} .
+            -t {repo}/functest-{container}:{tag} .
 
 - project:
-    name: '{repo}-{container}-{tag}-build'
+    name: '{repo}-functest-{container}-{tag}-build'
     container:
-      - functest-core
-      - functest-healthcheck
-      - functest-smoke
-      - functest-components
-      - functest-vnf
-      - functest-features
-      - functest-parser
+      - core
+      - healthcheck
+      - smoke
+      - components
+      - vnf
+      - features
+      - parser
     jobs:
-      - '{repo}-{container}-{tag}-build'
+      - '{repo}-functest-{container}-{tag}-build'
 
 - job-template:
     name: '{repo}-functest-{tag}-build'
     project-type: multijob
-    <<: *buildparameters
+    <<: *functest-buildparameters
     builders:
       - multijob:
           name: build functest-core
           projects:
             - name: '{repo}-functest-core-{tag}-build'
-              <<: *projectparameters
+              <<: *functest-projectparameters
       - multijob:
           name: build all remaining contrainers
           projects:
             - name: '{repo}-functest-healthcheck-{tag}-build'
-              <<: *projectparameters
+              <<: *functest-projectparameters
             - name: '{repo}-functest-smoke-{tag}-build'
-              <<: *projectparameters
+              <<: *functest-projectparameters
             - name: '{repo}-functest-components-{tag}-build'
-              <<: *projectparameters
+              <<: *functest-projectparameters
             - name: '{repo}-functest-vnf-{tag}-build'
-              <<: *projectparameters
+              <<: *functest-projectparameters
             - name: '{repo}-functest-features-{tag}-build'
-              <<: *projectparameters
+              <<: *functest-projectparameters
             - name: '{repo}-functest-parser-{tag}-build'
-              <<: *projectparameters
+              <<: *functest-projectparameters
 
 - project:
     name: '{repo}-functest-{tag}-build'
 - job-template:
     name: '{repo}-functest-{tag}-gate'
     project-type: multijob
-    <<: *buildparameters
+    <<: *functest-buildparameters
     builders:
       - multijob:
           name: build containers
           projects:
             - name: '{repo}-functest-{tag}-build'
-              <<: *projectparameters
+              <<: *functest-projectparameters
       - multijob:
           name: basics tests
           projects:
index 6f29606..31083e6 100644 (file)
@@ -4,6 +4,9 @@
     repo: 'opnfv'
     branch: 'stable/fraser'
     tag: 'fraser'
+
+- defaults:
+    name: functest-defaults
     prefix: '/home/opnfv/functest'
     nameserver: '8.8.8.8'
     external_network: 'ext-net'
index 58b3436..dffd2bb 100644 (file)
@@ -1,6 +1,7 @@
 ---
 - job-template:
-    name: '{repo}-{container}-{test}-{tag}-run'
+    name: '{repo}-functest-{container}-{test}-{tag}-run'
+    defaults: 'functest-defaults'
     builders:
       - shell: |
           docker run \
             {prefix}/results/$JOB_NAME-$BUILD_ID:/home/opnfv/functest/results \
             -v {prefix}/openstack.creds:/home/opnfv/functest/conf/env_file \
             -v {prefix}/images:/home/opnfv/functest/images \
-            {repo}/{container}:{tag} run_tests -t {test}
+            {repo}/functest-{container}:{tag} run_tests -t {test}
 
 - project:
-    name: '{repo}-healthcheck-{test}-{tag}-run'
-    container: functest-healthcheck
+    name: '{repo}-functest-healthcheck-{test}-{tag}-run'
+    container: healthcheck
     test:
       - connection_check
       - api_check
       - snaps_health_check
     jobs:
-      - '{repo}-{container}-{test}-{tag}-run'
+      - '{repo}-functest-{container}-{test}-{tag}-run'
 
 - job-template:
     name: '{repo}-functest-healthcheck-{tag}-run'
@@ -39,8 +40,8 @@
       - '{repo}-functest-healthcheck-{tag}-run'
 
 - project:
-    name: '{repo}-smoke-{test}-{tag}-run'
-    container: functest-smoke
+    name: '{repo}-functest-smoke-{test}-{tag}-run'
+    container: smoke
     test:
       - vping_ssh
       - vping_userdata
@@ -52,7 +53,7 @@
       - snaps_smoke
       - neutron_trunk
     jobs:
-      - '{repo}-{container}-{test}-{tag}-run'
+      - '{repo}-functest-{container}-{test}-{tag}-run'
 
 - job-template:
     name: '{repo}-functest-smoke-{tag}-run'
       - '{repo}-functest-smoke-{tag}-run'
 
 - project:
-    name: '{repo}-components-{test}-{tag}-run'
-    container: functest-components
+    name: '{repo}-functest-components-{test}-{tag}-run'
+    container: components
     test:
       - tempest_full_parallel
       - rally_full
     jobs:
-      - '{repo}-{container}-{test}-{tag}-run'
+      - '{repo}-functest-{container}-{test}-{tag}-run'
 
 - job-template:
     name: '{repo}-functest-components-{tag}-run'
       - '{repo}-functest-components-{tag}-run'
 
 - project:
-    name: '{repo}-vnf-{test}-{tag}-run'
-    container: functest-vnf
+    name: '{repo}-functest-vnf-{test}-{tag}-run'
+    container: vnf
     test:
       - cloudify_ims
       - vyos_vrouter
       - juju_epc
     jobs:
-      - '{repo}-{container}-{test}-{tag}-run'
+      - '{repo}-functest-{container}-{test}-{tag}-run'
 
 - job-template:
     name: '{repo}-functest-vnf-{tag}-run'
       - '{repo}-functest-vnf-{tag}-run'
 
 - project:
-    name: '{repo}-features-{test}-{tag}-run'
-    container: functest-features
+    name: '{repo}-functest-features-{test}-{tag}-run'
+    container: features
     test:
       - doctor-notification
       - bgpvpn
       - barometercollectd
       - fds
     jobs:
-      - '{repo}-{container}-{test}-{tag}-run'
+      - '{repo}-functest-{container}-{test}-{tag}-run'
 
 - job-template:
     name: '{repo}-functest-features-{tag}-run'
 
 - project:
     name: '{repo}-parser-{test}-{tag}-run'
-    container: functest-parser
+    container: parser
     test:
       - parser-basics
     jobs:
-      - '{repo}-{container}-{test}-{tag}-run'
+      - '{repo}-functest-{container}-{test}-{tag}-run'
 
 - job-template:
     name: '{repo}-functest-parser-{tag}-run'