cc16133f664121da70ed1739c43be4bc0c82b1bb
[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             server-name: 'gerrit.opnfv.org'
77             trigger-on:
78                 - patchset-created-event:
79                     exclude-drafts: 'false'
80                     exclude-trivial-rebase: 'false'
81                     exclude-no-code-change: 'false'
82                 - draft-published-event
83                 - comment-added-contains-event:
84                     comment-contains-value: 'recheck'
85                 - comment-added-contains-event:
86                     comment-contains-value: 'reverify'
87             projects:
88               - project-compare-type: 'ANT'
89                 project-pattern: '{project}'
90                 branches:
91                   - branch-compare-type: 'ANT'
92                     branch-pattern: '**/{branch}'
93                 file-paths:
94                   - compare-type: ANT
95                     pattern: 'ci/**'
96                   - compare-type: ANT
97                     pattern: 'build/**'
98                   - compare-type: ANT
99                     pattern: 'deploy/**'
100                 forbidden-file-paths:
101                   - compare-type: ANT
102                     pattern: 'docs/**'
103             readable-message: true
104
105     parameters:
106         - project-parameter:
107             project: '{project}'
108         - gerrit-parameter:
109             branch: '{branch}'
110         - 'opnfv-build-defaults'
111         - 'fuel-verify-defaults-exp':
112             gs-pathname: '{gs-pathname}'
113
114     builders:
115         - description-setter:
116             description: "Built on $NODE_NAME"
117         - multijob:
118             name: basic
119             condition: SUCCESSFUL
120             projects:
121                 - name: 'fuel-verify-basic-{stream-exp}'
122                   current-parameters: false
123                   predefined-parameters: |
124                     GERRIT_BRANCH=$GERRIT_BRANCH
125                     GERRIT_REFSPEC=$GERRIT_REFSPEC
126                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
127                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
128                   node-parameters: false
129                   kill-phase-on: FAILURE
130                   abort-all-job: true
131         - multijob:
132             name: build
133             condition: SUCCESSFUL
134             projects:
135                 - name: 'fuel-verify-build-{stream-exp}'
136                   current-parameters: false
137                   predefined-parameters: |
138                     GERRIT_BRANCH=$GERRIT_BRANCH
139                     GERRIT_REFSPEC=$GERRIT_REFSPEC
140                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
141                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
142                   node-parameters: false
143                   kill-phase-on: FAILURE
144                   abort-all-job: true
145         - multijob:
146             name: deploy-virtual
147             condition: SUCCESSFUL
148             projects:
149                 - name: 'fuel-verify-deploy-virtual-{stream-exp}'
150                   current-parameters: false
151                   predefined-parameters: |
152                     GERRIT_BRANCH=$GERRIT_BRANCH
153                     GERRIT_REFSPEC=$GERRIT_REFSPEC
154                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
155                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
156                   node-parameters: false
157                   kill-phase-on: FAILURE
158                   abort-all-job: true
159         - multijob:
160             name: smoke-test
161             condition: SUCCESSFUL
162             projects:
163                 - name: 'fuel-verify-smoke-test-{stream-exp}'
164                   current-parameters: false
165                   predefined-parameters: |
166                     GERRIT_BRANCH=$GERRIT_BRANCH
167                     GERRIT_REFSPEC=$GERRIT_REFSPEC
168                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
169                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
170                   node-parameters: false
171                   kill-phase-on: FAILURE
172                   abort-all-job: true
173
174 - job-template:
175     name: 'fuel-verify-{phase}-{stream-exp}'
176
177     disabled: '{obj:disabled}'
178
179     concurrent: true
180
181     properties:
182         - throttle:
183             enabled: true
184             max-total: 6
185             option: 'project'
186         - build-blocker:
187             use-build-blocker: true
188             blocking-jobs:
189                 - 'fuel-verify-deploy-.*'
190                 - 'fuel-verify-test-.*'
191             block-level: 'NODE'
192
193     scm:
194         - gerrit-trigger-scm:
195             credentials-id: '{ssh-credentials}'
196             refspec: '$GERRIT_REFSPEC'
197             choosing-strategy: 'gerrit'
198
199     wrappers:
200         - ssh-agent-credentials:
201             users:
202                 - '{ssh-credentials}'
203         - timeout:
204             timeout: 360
205             fail: true
206     parameters:
207         - project-parameter:
208             project: '{project}'
209         - gerrit-parameter:
210             branch: '{branch}'
211         - '{slave-label}-defaults'
212         - '{installer}-defaults'
213         - 'fuel-verify-defaults-exp':
214             gs-pathname: '{gs-pathname}'
215
216     builders:
217         - description-setter:
218             description: "Built on $NODE_NAME"
219         - '{project}-verify-{phase}-macro-exp'
220 #------------------------------------
221 # builder macros
222 #------------------------------------
223 - builder:
224     name: 'fuel-verify-basic-macro-exp'
225     builders:
226         - shell:
227             !include-raw: ./fuel-basic-exp.sh
228
229 - builder:
230     name: 'fuel-verify-build-macro-exp'
231     builders:
232         - shell:
233             !include-raw: ./fuel-build-exp.sh
234         - shell:
235             !include-raw: ./fuel-workspace-cleanup.sh
236
237 - builder:
238     name: 'fuel-verify-deploy-virtual-macro-exp'
239     builders:
240         - shell:
241             !include-raw: ./fuel-deploy-exp.sh
242
243 - builder:
244     name: 'fuel-verify-smoke-test-macro-exp'
245     builders:
246         - shell:
247             !include-raw: ./fuel-smoke-test-exp.sh
248 #------------------------------------
249 # parameter macros
250 #------------------------------------
251 - parameter:
252     name: 'fuel-verify-defaults-exp'
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."