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