Add rally_full in all gates
[releng.git] / jjb / functest / xtesting-docker.yaml
1 ---
2 ##############################################
3 # job configuration for docker build and push
4 ##############################################
5 - project:
6
7     name: xtesting-docker
8
9     project: functest-xtesting
10
11     stream:
12       - master:
13           branch: '{stream}'
14           disabled: false
15       - hunter:
16           branch: 'stable/{stream}'
17           disabled: false
18       - gambia:
19           branch: 'stable/{stream}'
20           disabled: false
21       - fraser:
22           branch: 'stable/{stream}'
23           disabled: false
24
25     arch_tag:
26       - 'amd64':
27           slave_label: 'opnfv-build-ubuntu'
28       - 'arm64':
29           slave_label: 'opnfv-build-ubuntu-arm'
30
31     # settings for jobs run in multijob phases
32     build-job-settings: &build-job-settings
33       current-parameters: false
34       git-revision: true
35       node-parameters: false
36       predefined-parameters: |
37         PUSH_IMAGE=$PUSH_IMAGE
38         COMMIT_ID=$COMMIT_ID
39         GERRIT_REFNAME=$GERRIT_REFNAME
40         DOCKERFILE=$DOCKERFILE
41       kill-phase-on: FAILURE
42       abort-all-jobs: false
43
44     manifest-job-settings: &manifest-job-settings
45       current-parameters: false
46       git-revision: true
47       node-parameters: false
48       predefined-parameters:
49         GERRIT_REFNAME=$GERRIT_REFNAME
50       kill-phase-on: FAILURE
51       abort-all-jobs: false
52
53     # yamllint enable rule:key-duplicates
54     jobs:
55       - "xtesting-docker-{stream}"
56       - "xtesting-docker-build-{arch_tag}-{stream}"
57       - "xtesting-docker-manifest-{stream}"
58
59 ########################
60 # job templates
61 ########################
62 - job-template:
63     name: 'xtesting-docker-{stream}'
64
65     project-type: multijob
66
67     disabled: '{obj:disabled}'
68
69     parameters:
70       - xtesting-job-parameters:
71           project: '{project}'
72           branch: '{branch}'
73           slave_label: 'opnfv-build-ubuntu'
74           arch_tag: 'amd64'
75
76     properties:
77       - throttle:
78           max-per-node: 1
79           option: 'project'
80
81     scm:
82       - git-scm
83
84     triggers:
85       - pollscm:
86           cron: "*/30 * * * *"
87       - gerrit-trigger-tag-created:
88           project: '{project}'
89
90     builders:
91       - multijob:
92           name: 'build xtesting images'
93           execution-type: PARALLEL
94           projects:
95             - name: 'xtesting-docker-build-amd64-{stream}'
96               <<: *build-job-settings
97             - name: 'xtesting-docker-build-arm64-{stream}'
98               <<: *build-job-settings
99       - multijob:
100           name: 'publish xtesting manifests'
101           execution-type: PARALLEL
102           projects:
103             - name: 'xtesting-docker-manifest-{stream}'
104               <<: *manifest-job-settings
105
106     publishers:
107       - 'xtesting-amd64-recipients'
108       - 'xtesting-arm64-recipients'
109
110 - job-template:
111     name: 'xtesting-docker-build-{arch_tag}-{stream}'
112     disabled: '{obj:disabled}'
113     parameters:
114       - xtesting-job-parameters:
115           project: '{project}'
116           branch: '{branch}'
117           slave_label: '{slave_label}'
118           arch_tag: '{arch_tag}'
119     scm:
120       - git-scm
121     builders:
122       - shell: |
123           #!/bin/bash -ex
124           sudo arch={arch_tag} bash ./build.sh
125           exit $?
126
127 - job-template:
128     name: 'xtesting-docker-manifest-{stream}'
129
130     parameters:
131       - project-parameter:
132           project: '{project}'
133           branch: '{branch}'
134       - label:
135           name: SLAVE_LABEL
136           default: 'opnfv-build-ubuntu'
137           description: 'Slave label on Jenkins'
138           all-nodes: false
139           node-eligibility: 'ignore-offline'
140       - string:
141           name: PROJECT
142           default: "{project}"
143           description: "Project name used to enable job conditions"
144       - string:
145           name: GIT_BASE
146           default: https://gerrit.opnfv.org/gerrit/$PROJECT
147           description: 'Git URL to use on this Jenkins Slave'
148       - string:
149           name: REPO
150           default: "opnfv"
151           description: "Repository name for functest images"
152
153
154     disabled: '{obj:disabled}'
155
156     builders:
157       - shell: |
158           #!/bin/bash -ex
159           case "{stream}" in
160           "master")
161               tag="latest" ;;
162           *)
163               tag="{stream}" ;;
164           esac
165           sudo manifest-tool push from-args \
166               --platforms linux/amd64,linux/arm64 \
167               --template $REPO/xtesting:ARCH-$tag \
168               --target $REPO/xtesting:$tag
169           exit $?
170
171 - parameter:
172     name: xtesting-job-parameters
173     parameters:
174       - project-parameter:
175           project: '{project}'
176           branch: '{branch}'
177       - label:
178           name: SLAVE_LABEL
179           default: '{slave_label}'
180           description: 'Slave label on Jenkins'
181           all-nodes: false
182           node-eligibility: 'ignore-offline'
183       - string:
184           name: GIT_BASE
185           default: https://gerrit.opnfv.org/gerrit/$PROJECT
186           description: 'Git URL to use on this Jenkins Slave'
187       - string:
188           name: PUSH_IMAGE
189           default: "true"
190           description: "To enable/disable pushing the image to Dockerhub."
191       - string:
192           name: COMMIT_ID
193           default: ""
194           description: "commit id to make a snapshot docker image"
195       - string:
196           name: GERRIT_REFNAME
197           default: ""
198           description: "Docker tag to be built, e.g. refs/tags/5.0.0, refs/tags/opnfv-5.0.0, refs/tags/5.0.RC1"
199       - string:
200           name: DOCKERFILE
201           default: "Dockerfile"
202           description: "Dockerfile to use for creating the image."
203       - string:
204           name: ARCH_TAG
205           default: "{arch_tag}"
206           description: "If set, this value will be added to the docker image tag as a prefix"
207       - string:
208           name: PROJECT
209           default: "{project}"
210           description: "Project name used to enable job conditions"
211       - string:
212           name: REPO
213           default: "opnfv"
214           description: "Repository name for functest images"
215
216 # publisher macros
217 - publisher:
218     name: 'xtesting-arm64-recipients'
219     publishers:
220       - email:
221           recipients: >
222             cristina.pauna@enea.com
223             alexandru.avadanii@enea.com
224             delia.popescu@enea.com
225
226 - publisher:
227     name: 'xtesting-amd64-recipients'
228     publishers:
229       - email:
230           recipients: >
231             jalausuch@suse.com morgan.richomme@orange.com
232             cedric.ollivier@orange.com feng.xiaowei@zte.com.cn
233             juha.kosonen@nokia.com wangwulin@huawei.com
234             valentin.boucher@kontron.com