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