xci sfc: Enable post merge deployment
[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             - 'bifrost-verify-{distro}-.*'
64             - 'bifrost-periodic-{distro}-.*'
65             - 'xci-osa-verify-{distro}-.*'
66             - 'xci-osa-periodic-{distro}-.*'
67             - 'xci-(os|k8s).*?-virtual-{distro}-.*'
68           block-level: 'NODE'
69
70     wrappers:
71       - ssh-agent-wrapper
72       - build-timeout:
73           timeout: 240
74       - fix-workspace-permissions
75
76     scm:
77       - git-scm
78
79     triggers:
80       - gerrit:
81           server-name: 'gerrit.opnfv.org'
82           trigger-on:
83             - change-merged-event
84             - comment-added-contains-event:
85                 comment-contains-value: 'remerge'
86           projects:
87             - project-compare-type: 'ANT'
88               project-pattern: '{obj:project}'
89               branches:
90                 - branch-compare-type: 'ANT'
91                   branch-pattern: '**/{branch}'
92               disable-strict-forbidden-file-verification: 'true'
93               file-paths:
94                 - compare-type: ANT
95                   pattern: 'scenarios/**'
96           readable-message: true
97           custom-url: '* $JOB_NAME $BUILD_URL'
98
99     parameters:
100       - project-parameter:
101           project: '{obj:project}'
102           branch: '{branch}'
103       - label:
104           name: SLAVE_LABEL
105           default: 'xci-virtual'
106       - string:
107           name: CLEAN_DIB_IMAGES
108           default: 'true'
109       - string:
110           name: GIT_BASE
111           default: https://gerrit.opnfv.org/gerrit/$PROJECT
112           description: 'Git URL to use on this Jenkins Slave'
113
114     builders:
115       - description-setter:
116           description: "Built on $NODE_NAME"
117       - multijob:
118           name: deploy
119           condition: SUCCESSFUL
120           projects:
121             - name: 'xci-deploy-{type}-{distro}-merge-{stream}'
122               current-parameters: true
123               predefined-parameters: |
124                 PROJECT=$PROJECT
125                 DISTRO={distro}
126                 DEPLOY_SCENARIO={scenario}
127                 CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
128                 GERRIT_BRANCH=$GERRIT_BRANCH
129                 GERRIT_REFSPEC=$GERRIT_REFSPEC
130                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
131                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
132               node-parameters: true
133               kill-phase-on: FAILURE
134               abort-all-job: true
135       - multijob:
136           name: healthcheck
137           condition: SUCCESSFUL
138           projects:
139             - name: 'xci-healthcheck-{type}-{distro}-merge-{stream}'
140               current-parameters: true
141               predefined-parameters: |
142                 PROJECT=$PROJECT
143                 DISTRO={distro}
144                 DEPLOY_SCENARIO={scenario}
145                 CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
146                 FUNCTEST_MODE=tier
147                 FUNCTEST_TIER=healthcheck
148                 GERRIT_BRANCH=$GERRIT_BRANCH
149                 GERRIT_REFSPEC=$GERRIT_REFSPEC
150                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
151                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
152               node-parameters: true
153               kill-phase-on: NEVER
154               abort-all-job: true
155
156 - job-template:
157     name: 'xci-{phase}-{type}-{distro}-merge-{stream}'
158
159     disabled: false
160
161     concurrent: true
162
163     properties:
164       - logrotate-default
165       - build-blocker:
166           use-build-blocker: true
167           blocking-jobs:
168             - '.*-bifrost-verify-.*'
169             - '.*-bifrost-periodic-.*'
170             - 'osa-verify-.*'
171             - 'osa-periodic-.*'
172           block-level: 'NODE'
173
174     parameters:
175       - string:
176           name: PROJECT
177           default: 'releng-xci'
178       - string:
179           name: DISTRO
180           default: 'ubuntu'
181       - string:
182           name: DEPLOY_SCENARIO
183           default: 'os-nosdn-nofeature-noha'
184       - string:
185           name: FUNCTEST_MODE
186           default: 'tier'
187       - string:
188           name: FUNCTEST_SUITE_NAME
189           default: 'healthcheck'
190       - string:
191           name: XCI_FLAVOR
192           default: 'mini'
193       - string:
194           name: CLEAN_DIB_IMAGES
195           default: 'true'
196       - string:
197           name: OPNFV_RELENG_DEV_PATH
198           default: $WORKSPACE/
199       - string:
200           name: INSTALLER_TYPE
201           default: 'osa'
202       - string:
203           name: GIT_BASE
204           default: https://gerrit.opnfv.org/gerrit/$PROJECT
205           description: 'Git URL to use on this Jenkins Slave'
206
207     wrappers:
208       - ssh-agent-wrapper
209       - build-timeout:
210           timeout: 240
211       - fix-workspace-permissions
212
213     scm:
214       - git-scm
215
216     builders:
217       - description-setter:
218           description: "Built on $NODE_NAME"
219       - 'xci-merge-{phase}-macro'
220
221 # -------------------------------
222 # builder macros
223 # -------------------------------
224 - builder:
225     name: 'xci-merge-deploy-macro'
226     builders:
227       - shell:
228           !include-raw: ./xci-start-new-vm.sh
229       - shell:
230           !include-raw: ./xci-start-deployment.sh
231
232 - builder:
233     name: 'xci-merge-healthcheck-macro'
234     builders:
235       - shell:
236           !include-raw: ./xci-run-functest.sh
237       - shell:
238           !include-raw: ./xci-cleanup.sh
239
240 - builder:
241     name: 'xci-merge-promote-macro'
242     builders:
243       - shell:
244           !include-raw: ./xci-promote.sh