2662cb7c081104f6560e2ed153efbe8211de5c92
[releng.git] / jjb / fuel / 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: false
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: 6
186             option: 'project'
187         - build-blocker:
188             use-build-blocker: true
189             blocking-jobs:
190                 - 'fuel-verify-deploy-.*'
191                 - 'fuel-verify-test-.*'
192             block-level: 'NODE'
193
194     scm:
195         - gerrit-trigger-scm:
196             credentials-id: '{ssh-credentials}'
197             refspec: '$GERRIT_REFSPEC'
198             choosing-strategy: 'gerrit'
199
200     wrappers:
201         - ssh-agent-credentials:
202             users:
203                 - '{ssh-credentials}'
204         - timeout:
205             timeout: 360
206             fail: true
207     parameters:
208         - project-parameter:
209             project: '{project}'
210         - gerrit-parameter:
211             branch: '{branch}'
212         - '{slave-label}-defaults'
213         - '{installer}-defaults'
214         - 'fuel-verify-defaults':
215             gs-pathname: '{gs-pathname}'
216
217     builders:
218         - description-setter:
219             description: "Built on $NODE_NAME"
220         - '{project}-verify-{phase}-macro'
221 #####################################
222 # builder macros
223 #####################################
224 - builder:
225     name: 'fuel-verify-basic-macro'
226     builders:
227         - shell: |
228             #!/bin/bash
229
230             echo "Not activated!"
231
232 - builder:
233     name: 'fuel-verify-build-macro'
234     builders:
235         - shell:
236             !include-raw: ./fuel-build.sh
237         - shell:
238             !include-raw: ./fuel-workspace-cleanup.sh
239
240 - builder:
241     name: 'fuel-verify-deploy-virtual-macro'
242     builders:
243         - shell: |
244             #!/bin/bash
245
246             echo "Not activated!"
247
248 - builder:
249     name: 'fuel-verify-smoke-test-macro'
250     builders:
251         - shell: |
252             #!/bin/bash
253
254             echo "Not activated!"
255 #####################################
256 # parameter macros
257 #####################################
258 - parameter:
259     name: 'fuel-verify-defaults'
260     parameters:
261         - string:
262             name: BUILD_DIRECTORY
263             default: $WORKSPACE/build_output
264             description: "Directory where the build artifact will be located upon the completion of the build."
265         - string:
266             name: CACHE_DIRECTORY
267             default: $HOME/opnfv/cache/$INSTALLER_TYPE
268             description: "Directory where the cache to be used during the build is located."
269         - string:
270             name: GS_URL
271             default: artifacts.opnfv.org/$PROJECT{gs-pathname}
272             description: "URL to Google Storage."