jjb: xci: Drop the VM cleanup step from the functest jobs
[releng.git] / jjb / xci / xci-merge-jobs.yml
1 ---
2 - project:
3     name: 'opnfv-xci-merge'
4
5     # -------------------------------
6     # branches
7     # -------------------------------
8     stream:
9       - master:
10           branch: '{stream}'
11     # -------------------------------
12     # distros
13     # -------------------------------
14     distro:
15       - ubuntu:
16           disabled: false
17       - centos:
18           disabled: false
19       - opensuse:
20           disabled: false
21     # -------------------------------
22     # type
23     # -------------------------------
24     type:
25       - virtual
26     # -------------------------------
27     # patch verification phases
28     # -------------------------------
29     phase:
30       - 'deploy'
31       - 'healthcheck'
32       - 'promote'
33     # -------------------------------
34     # scenarios
35     # -------------------------------
36     scenario:
37       - 'os-odl-sfc':
38           project: sfc
39     # -------------------------------
40     # jobs
41     # -------------------------------
42     jobs:
43       - 'xci-{scenario}-{type}-{distro}-merge-{stream}'
44       - 'xci-{phase}-{type}-{distro}-merge-{stream}'
45 # -------------------------------
46 # job templates
47 # -------------------------------
48 - job-template:
49     name: 'xci-{scenario}-{type}-{distro}-merge-{stream}'
50
51     project-type: multijob
52
53     disabled: '{obj:disabled}'
54
55     concurrent: false
56
57     properties:
58       - logrotate-default
59       - build-blocker:
60           use-build-blocker: true
61           blocking-jobs:
62             - 'xci-verify-{distro}-.*'
63             - 'xci-.*-{distro}-merge-.*'
64             - 'openstack-bifrost-verify-{distro}-.*'
65             - 'xci-osa-verify-{distro}-.*'
66             - 'xci-osa-periodic-{distro}-.*'
67             - 'xci-(os|k8s).*?-virtual-{distro}-.*'
68           block-level: 'NODE'
69       - throttle:
70           max-per-node: 2
71           max-total: 10
72           categories:
73             - xci-verify-virtual
74           option: category
75
76     wrappers:
77       - ssh-agent-wrapper
78       - build-timeout:
79           timeout: 240
80       - fix-workspace-permissions
81
82     scm:
83       - git:
84           credentials-id: '$SSH_CREDENTIAL_ID'
85           url: 'https://gerrit.opnfv.org/gerrit/releng-xci'
86           branches:
87             - 'origin/master'
88           timeout: 15
89
90     triggers:
91       - gerrit:
92           server-name: 'gerrit.opnfv.org'
93           trigger-on:
94             - change-merged-event
95             - comment-added-contains-event:
96                 comment-contains-value: 'remerge'
97           projects:
98             - project-compare-type: 'ANT'
99               project-pattern: '{obj:project}'
100               branches:
101                 - branch-compare-type: 'ANT'
102                   branch-pattern: '**/{branch}'
103               disable-strict-forbidden-file-verification: 'true'
104               file-paths:
105                 - compare-type: ANT
106                   pattern: 'scenarios/**'
107           readable-message: true
108           custom-url: '* $JOB_NAME $BUILD_URL'
109
110     parameters:
111       - project-parameter:
112           project: '{obj:project}'
113           branch: '{branch}'
114       - label:
115           name: SLAVE_LABEL
116           default: 'xci-virtual'
117       - string:
118           name: DEPLOY_SCENARIO
119           default: '{scenario}'
120       - string:
121           name: CLEAN_DIB_IMAGES
122           default: 'true'
123       - string:
124           name: GIT_BASE
125           default: https://gerrit.opnfv.org/gerrit/$PROJECT
126           description: 'Git URL to use on this Jenkins Slave'
127
128     builders:
129       - description-setter:
130           description: "Built on $NODE_NAME"
131       - multijob:
132           name: deploy
133           condition: SUCCESSFUL
134           projects:
135             - name: 'xci-deploy-{type}-{distro}-merge-{stream}'
136               current-parameters: true
137               predefined-parameters: |
138                 PROJECT=$PROJECT
139                 DISTRO={distro}
140                 DEPLOY_SCENARIO={scenario}
141                 CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
142                 GERRIT_BRANCH=$GERRIT_BRANCH
143                 GERRIT_REFSPEC=$GERRIT_REFSPEC
144                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
145                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
146               node-parameters: true
147               kill-phase-on: FAILURE
148               abort-all-job: true
149       - multijob:
150           name: healthcheck
151           condition: SUCCESSFUL
152           projects:
153             - name: 'xci-healthcheck-{type}-{distro}-merge-{stream}'
154               current-parameters: true
155               predefined-parameters: |
156                 PROJECT=$PROJECT
157                 DISTRO={distro}
158                 DEPLOY_SCENARIO={scenario}
159                 CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
160                 FUNCTEST_MODE=tier
161                 FUNCTEST_TIER=healthcheck
162                 GERRIT_BRANCH=$GERRIT_BRANCH
163                 GERRIT_REFSPEC=$GERRIT_REFSPEC
164                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
165                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
166               node-parameters: true
167               kill-phase-on: NEVER
168               abort-all-job: true
169
170     publishers:
171       - postbuildscript:
172           script-only-if-succeeded: false
173           script-only-if-failed: false
174           builders:
175             - shell:
176                 !include-raw: ./xci-cleanup.sh
177
178 - job-template:
179     name: 'xci-{phase}-{type}-{distro}-merge-{stream}'
180
181     disabled: false
182
183     concurrent: true
184
185     properties:
186       - logrotate-default
187       - build-blocker:
188           use-build-blocker: true
189           blocking-jobs:
190             - '.*-bifrost-verify-.*'
191             - '.*-bifrost-periodic-.*'
192             - 'osa-verify-.*'
193             - 'osa-periodic-.*'
194           block-level: 'NODE'
195
196     parameters:
197       - string:
198           name: PROJECT
199           default: 'releng-xci'
200       - string:
201           name: DISTRO
202           default: 'ubuntu'
203       - string:
204           name: DEPLOY_SCENARIO
205           default: 'os-nosdn-nofeature-noha'
206       - string:
207           name: FUNCTEST_MODE
208           default: 'tier'
209       - string:
210           name: FUNCTEST_SUITE_NAME
211           default: 'healthcheck'
212       - string:
213           name: XCI_FLAVOR
214           default: 'mini'
215       - string:
216           name: CLEAN_DIB_IMAGES
217           default: 'true'
218       - string:
219           name: OPNFV_RELENG_DEV_PATH
220           default: $WORKSPACE/
221       - string:
222           name: INSTALLER_TYPE
223           default: 'osa'
224       - string:
225           name: GIT_BASE
226           default: https://gerrit.opnfv.org/gerrit/$PROJECT
227           description: 'Git URL to use on this Jenkins Slave'
228
229     wrappers:
230       - ssh-agent-wrapper
231       - build-timeout:
232           timeout: 240
233       - fix-workspace-permissions
234
235     scm:
236       - git:
237           credentials-id: '$SSH_CREDENTIAL_ID'
238           url: 'https://gerrit.opnfv.org/gerrit/releng-xci'
239           branches:
240             - 'origin/master'
241           timeout: 15
242
243     builders:
244       - description-setter:
245           description: "Built on $NODE_NAME"
246       - 'xci-merge-{phase}-macro'
247
248 # -------------------------------
249 # builder macros
250 # -------------------------------
251 - builder:
252     name: 'xci-merge-deploy-macro'
253     builders:
254       - shell:
255           !include-raw: ./xci-start-new-vm.sh
256       - shell:
257           !include-raw: ./xci-start-deployment.sh
258
259 - builder:
260     name: 'xci-merge-healthcheck-macro'
261     builders:
262       - shell:
263           !include-raw: ./xci-run-functest.sh
264
265 - builder:
266     name: 'xci-merge-promote-macro'
267     builders:
268       - shell:
269           !include-raw: ./xci-promote.sh