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