6f889813846b636e0864f5f5edcaf061179654a8
[releng.git] / fuel-verify-jobs.yml
1 - project:
2     name: 'fuel-verify-jobs'
3
4     project: 'fuel'
5
6     installer: 'fuel'
7 #####################################
8 # branch definitions
9 #####################################
10     stream:
11         - master:
12             branch: '{stream}'
13             gs-pathname: ''
14             disabled: false
15         - colorado:
16             branch: 'stable/{stream}'
17             gs-pathname: '/{stream}'
18             disabled: true
19 #####################################
20 # patch verification phases
21 #####################################
22     phase:
23         - 'basic':
24             slave-label: 'opnfv-build-ubuntu'
25         - 'build':
26             slave-label: 'opnfv-build-ubuntu'
27         - 'deploy-virtual':
28             slave-label: 'fuel-virtual'
29         - 'smoke-test':
30             slave-label: 'fuel-virtual'
31 #####################################
32 # jobs
33 #####################################
34     jobs:
35         - 'fuel-verify-{stream}'
36         - 'fuel-verify-{phase}-{stream}'
37 #####################################
38 # job templates
39 #####################################
40 - job-template:
41     name: 'fuel-verify-{stream}'
42
43     project-type: multijob
44
45     disabled: '{obj:disabled}'
46
47     concurrent: true
48
49     properties:
50         - throttle:
51             enabled: true
52             max-total: 4
53             max-per-node: 1
54             option: 'project'
55         - build-blocker:
56             use-build-blocker: true
57             blocking-jobs:
58                 - 'fuel-verify-master'
59                 - 'fuel-verify-colorado'
60             block-level: 'NODE'
61
62     scm:
63         - gerrit-trigger-scm:
64             credentials-id: '{ssh-credentials}'
65             refspec: '$GERRIT_REFSPEC'
66             choosing-strategy: 'gerrit'
67
68     wrappers:
69         - ssh-agent-credentials:
70             users:
71                 - '{ssh-credentials}'
72         - timeout:
73             timeout: 360
74             fail: true
75
76     triggers:
77         - gerrit:
78             trigger-on:
79                 - patchset-created-event:
80                     exclude-drafts: 'false'
81                     exclude-trivial-rebase: 'false'
82                     exclude-no-code-change: 'false'
83                 - draft-published-event
84                 - comment-added-contains-event:
85                     comment-contains-value: 'recheck'
86                 - comment-added-contains-event:
87                     comment-contains-value: 'reverify'
88             projects:
89               - project-compare-type: 'ANT'
90                 project-pattern: '{project}'
91                 branches:
92                   - branch-compare-type: 'ANT'
93                     branch-pattern: '**/{branch}'
94                 file-paths:
95                   - compare-type: ANT
96                     pattern: 'ci/**'
97                   - compare-type: ANT
98                     pattern: 'build/**'
99                   - compare-type: ANT
100                     pattern: 'deploy/**'
101                 forbidden-file-paths:
102                   - compare-type: ANT
103                     pattern: 'docs/**'
104             readable-message: true
105
106     parameters:
107         - project-parameter:
108             project: '{project}'
109         - gerrit-parameter:
110             branch: '{branch}'
111         - 'fuel-virtual-defaults'
112         - 'fuel-verify-defaults':
113             gs-pathname: '{gs-pathname}'
114
115     builders:
116         - description-setter:
117             description: "Built on $NODE_NAME"
118         - multijob:
119             name: basic
120             condition: SUCCESSFUL
121             projects:
122                 - name: 'fuel-verify-basic-{stream}'
123                   current-parameters: false
124                   predefined-parameters: |
125                     GERRIT_BRANCH=$GERRIT_BRANCH
126                     GERRIT_REFSPEC=$GERRIT_REFSPEC
127                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
128                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
129                   node-parameters: false
130                   kill-phase-on: FAILURE
131                   abort-all-job: true
132         - multijob:
133             name: build
134             condition: SUCCESSFUL
135             projects:
136                 - name: 'fuel-verify-build-{stream}'
137                   current-parameters: false
138                   predefined-parameters: |
139                     GERRIT_BRANCH=$GERRIT_BRANCH
140                     GERRIT_REFSPEC=$GERRIT_REFSPEC
141                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
142                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
143                   node-parameters: false
144                   kill-phase-on: FAILURE
145                   abort-all-job: true
146         - multijob:
147             name: deploy-virtual
148             condition: SUCCESSFUL
149             projects:
150                 - name: 'fuel-verify-deploy-virtual-{stream}'
151                   current-parameters: false
152                   predefined-parameters: |
153                     GERRIT_BRANCH=$GERRIT_BRANCH
154                     GERRIT_REFSPEC=$GERRIT_REFSPEC
155                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
156                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
157                   node-parameters: true
158                   kill-phase-on: FAILURE
159                   abort-all-job: true
160         - multijob:
161             name: smoke-test
162             condition: SUCCESSFUL
163             projects:
164                 - name: 'fuel-verify-smoke-test-{stream}'
165                   current-parameters: false
166                   predefined-parameters: |
167                     GERRIT_BRANCH=$GERRIT_BRANCH
168                     GERRIT_REFSPEC=$GERRIT_REFSPEC
169                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
170                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
171                   node-parameters: true
172                   kill-phase-on: FAILURE
173                   abort-all-job: true
174
175 - job-template:
176     name: 'fuel-verify-{phase}-{stream}'
177
178     disabled: '{obj:disabled}'
179
180     concurrent: true
181
182     properties:
183         - throttle:
184             enabled: true
185             max-total: 4
186             max-per-node: 1
187             option: 'project'
188         - build-blocker:
189             use-build-blocker: true
190             blocking-jobs:
191                 - 'fuel-verify-deploy-.*'
192                 - 'fuel-verify-test-.*'
193             block-level: 'NODE'
194
195     scm:
196         - gerrit-trigger-scm:
197             credentials-id: '{ssh-credentials}'
198             refspec: '$GERRIT_REFSPEC'
199             choosing-strategy: 'gerrit'
200
201     wrappers:
202         - ssh-agent-credentials:
203             users:
204                 - '{ssh-credentials}'
205         - timeout:
206             timeout: 360
207             fail: true
208     parameters:
209         - project-parameter:
210             project: '{project}'
211         - gerrit-parameter:
212             branch: '{branch}'
213         - '{slave-label}-defaults'
214         - '{installer}-defaults'
215         - 'fuel-verify-defaults':
216             gs-pathname: '{gs-pathname}'
217
218     builders:
219         - description-setter:
220             description: "Built on $NODE_NAME"
221         - '{project}-verify-{phase}-macro'
222 #####################################
223 # builder macros
224 #####################################
225 - builder:
226     name: 'fuel-verify-basic-macro'
227     builders:
228         - shell: |
229             #!/bin/bash
230
231             echo "Not activated!"
232
233 - builder:
234     name: 'fuel-verify-build-macro'
235     builders:
236         - shell:
237             !include-raw-escape: ./fuel-build.sh
238         - shell:
239             !include-raw-escape: ./fuel-workspace-cleanup.sh
240
241 - builder:
242     name: 'fuel-verify-deploy-virtual-macro'
243     builders:
244         - shell: |
245             #!/bin/bash
246
247             echo "Not activated!"
248
249 - builder:
250     name: 'fuel-verify-smoke-test-macro'
251     builders:
252         - shell: |
253             #!/bin/bash
254
255             echo "Not activated!"
256 #####################################
257 # parameter macros
258 #####################################
259 - parameter:
260     name: 'fuel-verify-defaults'
261     parameters:
262         - string:
263             name: BUILD_DIRECTORY
264             default: $WORKSPACE/build_output
265             description: "Directory where the build artifact will be located upon the completion of the build."
266         - string:
267             name: CACHE_DIRECTORY
268             default: $HOME/opnfv/cache/$INSTALLER_TYPE
269             description: "Directory where the cache to be used during the build is located."
270         - string:
271             name: GS_URL
272             default: artifacts.opnfv.org/$PROJECT{gs-pathname}
273             description: "URL to Google Storage."