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