Merge changes If9b61064,I0490eade
[functest.git] / ci / gate.yaml
1 ---
2 - functest-buildparameters: &functest-buildparameters
3     name: 'functest-buildparameters'
4     parameters:
5       - string:
6           name: branch
7           default: '{branch}'
8
9 - functest-projectparameters: &functest-projectparameters
10     name: 'functest-projectparameters'
11     current-parameters: true
12
13 - scm:
14     name: functest-gerrit
15     scm:
16       - git:
17           url: https://gerrit.opnfv.org/gerrit/functest
18           refspec: '+refs/changes/*:refs/changes/*'
19           branches:
20             - ${branch}
21
22 - job-template:
23     name: '{repo}-functest-{container}-{tag}-build'
24     <<: *functest-buildparameters
25     scm:
26       - functest-gerrit
27     builders:
28       - shell: |
29           cd docker/$(echo {container} |cut -d\- -f 2)
30           docker build \
31             --pull=false --no-cache --force-rm=true \
32             --build-arg BRANCH=${{branch}} \
33             -t {repo}/functest-{container}:{tag} .
34
35 - project:
36     name: '{repo}-functest-{container}-{tag}-build'
37     container:
38       - core
39       - tempest
40       - healthcheck
41       - smoke
42       - benchmarking
43       - components
44       - vnf
45       - features
46     jobs:
47       - '{repo}-functest-{container}-{tag}-build'
48
49 - job-template:
50     name: '{repo}-functest-{tag}-build'
51     project-type: multijob
52     <<: *functest-buildparameters
53     builders:
54       - multijob:
55           name: build functest-core
56           projects:
57             - name: '{repo}-functest-core-{tag}-build'
58               <<: *functest-projectparameters
59       - multijob:
60           name: build functest-tempest
61           projects:
62             - name: '{repo}-functest-tempest-{tag}-build'
63               <<: *functest-projectparameters
64       - multijob:
65           name: build all remaining contrainers
66           projects:
67             - name: '{repo}-functest-healthcheck-{tag}-build'
68               <<: *functest-projectparameters
69             - name: '{repo}-functest-smoke-{tag}-build'
70               <<: *functest-projectparameters
71             - name: '{repo}-functest-benchmarking-{tag}-build'
72               <<: *functest-projectparameters
73             - name: '{repo}-functest-components-{tag}-build'
74               <<: *functest-projectparameters
75             - name: '{repo}-functest-vnf-{tag}-build'
76               <<: *functest-projectparameters
77             - name: '{repo}-functest-features-{tag}-build'
78               <<: *functest-projectparameters
79
80 - project:
81     name: '{repo}-functest-{tag}-build'
82     jobs:
83       - '{repo}-functest-{tag}-build'
84
85 - job-template:
86     name: '{repo}-functest-{tag}-gate'
87     project-type: multijob
88     <<: *functest-buildparameters
89     builders:
90       - multijob:
91           name: build containers
92           projects:
93             - name: '{repo}-functest-{tag}-build'
94               <<: *functest-projectparameters
95       - multijob:
96           name: basics tests
97           projects:
98             - name: '{repo}-functest-healthcheck-{tag}-run'
99       - multijob:
100           name: advanced tests
101           projects:
102             - name: '{repo}-functest-smoke-{tag}-run'
103             - name: '{repo}-functest-benchmarking-{tag}-run'
104             - name: '{repo}-functest-components-{tag}-run'
105             - name: '{repo}-functest-vnf-{tag}-run'
106             - name: '{repo}-functest-features-{tag}-run'
107
108 - project:
109     name: '{repo}-functest-{tag}-gate'
110     jobs:
111       - '{repo}-functest-{tag}-gate'