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