Merge "Create new project/user for snaps tests"
[functest.git] / ci / gate.yaml
1 ---
2 - buildparameters: &buildparameters
3     name: 'buildparameters'
4     parameters:
5       - string:
6           name: branch
7           default: '{branch}'
8
9 - projectparameters: &projectparameters
10     name: 'projectparameters'
11     current-parameters: true
12
13 - scm:
14     name: 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}-{container}-{tag}-build'
24     <<: *buildparameters
25     scm:
26       - 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}/{container}:{tag} .
34
35 - project:
36     name: '{repo}-{container}-{tag}-build'
37     container:
38       - functest-core
39       - functest-tempest
40       - functest-healthcheck
41       - functest-smoke
42       - functest-components
43       - functest-vnf
44       - functest-features
45     jobs:
46       - '{repo}-{container}-{tag}-build'
47
48 - job-template:
49     name: '{repo}-functest-{tag}-build'
50     project-type: multijob
51     <<: *buildparameters
52     builders:
53       - multijob:
54           name: build functest-core
55           projects:
56             - name: '{repo}-functest-core-{tag}-build'
57               <<: *projectparameters
58       - multijob:
59           name: build functest-tempest
60           projects:
61             - name: '{repo}-functest-tempest-{tag}-build'
62               <<: *projectparameters
63       - multijob:
64           name: build all remaining contrainers
65           projects:
66             - name: '{repo}-functest-healthcheck-{tag}-build'
67               <<: *projectparameters
68             - name: '{repo}-functest-smoke-{tag}-build'
69               <<: *projectparameters
70             - name: '{repo}-functest-components-{tag}-build'
71               <<: *projectparameters
72             - name: '{repo}-functest-vnf-{tag}-build'
73               <<: *projectparameters
74             - name: '{repo}-functest-features-{tag}-build'
75               <<: *projectparameters
76
77 - project:
78     name: '{repo}-functest-{tag}-build'
79     jobs:
80       - '{repo}-functest-{tag}-build'
81
82 - job-template:
83     name: '{repo}-functest-{tag}-gate'
84     project-type: multijob
85     <<: *buildparameters
86     builders:
87       - multijob:
88           name: build containers
89           projects:
90             - name: '{repo}-functest-{tag}-build'
91               <<: *projectparameters
92       - multijob:
93           name: basics tests
94           projects:
95             - name: '{repo}-functest-healthcheck-{tag}-run'
96       - multijob:
97           name: advanced tests
98           projects:
99             - name: '{repo}-functest-smoke-{tag}-run'
100             - name: '{repo}-functest-components-{tag}-run'
101             - name: '{repo}-functest-vnf-{tag}-run'
102             - name: '{repo}-functest-features-{tag}-run'
103
104 - project:
105     name: '{repo}-functest-{tag}-gate'
106     jobs:
107       - '{repo}-functest-{tag}-gate'