7b8656800071010a1813807789b229a72c4b57b9
[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             server-name: 'gerrit.opnfv.org'
72             trigger-on:
73                 - patchset-created-event:
74                     exclude-drafts: 'false'
75                     exclude-trivial-rebase: 'false'
76                     exclude-no-code-change: 'false'
77                 - draft-published-event
78                 - comment-added-contains-event:
79                     comment-contains-value: 'recheck'
80                 - comment-added-contains-event:
81                     comment-contains-value: 'reverify'
82             projects:
83               - project-compare-type: 'ANT'
84                 project-pattern: '{project}'
85                 branches:
86                   - branch-compare-type: 'ANT'
87                     branch-pattern: '**/{branch}'
88                 file-paths:
89                   - compare-type: ANT
90                     pattern: 'ci/**'
91                   - compare-type: ANT
92                     pattern: 'build/**'
93                   - compare-type: ANT
94                     pattern: 'deploy/**'
95                 forbidden-file-paths:
96                   - compare-type: ANT
97                     pattern: 'docs/**'
98             readable-message: true
99
100     parameters:
101         - project-parameter:
102             project: '{project}'
103         - gerrit-parameter:
104             branch: '{branch}'
105         - 'opnfv-build-defaults'
106         - 'fuel-verify-defaults':
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}'
117                   current-parameters: false
118                   predefined-parameters: |
119                     GERRIT_BRANCH=$GERRIT_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}'
131                   current-parameters: false
132                   predefined-parameters: |
133                     GERRIT_BRANCH=$GERRIT_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}'
145                   current-parameters: false
146                   predefined-parameters: |
147                     GERRIT_BRANCH=$GERRIT_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}'
159                   current-parameters: false
160                   predefined-parameters: |
161                     GERRIT_BRANCH=$GERRIT_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}'
171
172     disabled: '{obj:disabled}'
173
174     concurrent: true
175
176     properties:
177         - throttle:
178             enabled: true
179             max-total: 6
180             option: 'project'
181         - build-blocker:
182             use-build-blocker: true
183             blocking-jobs:
184                 - 'fuel-verify-deploy-.*'
185                 - 'fuel-verify-test-.*'
186             block-level: 'NODE'
187
188     scm:
189         - gerrit-trigger-scm:
190             credentials-id: '{ssh-credentials}'
191             refspec: '$GERRIT_REFSPEC'
192             choosing-strategy: 'gerrit'
193
194     wrappers:
195         - ssh-agent-credentials:
196             users:
197                 - '{ssh-credentials}'
198         - timeout:
199             timeout: 360
200             fail: true
201     parameters:
202         - project-parameter:
203             project: '{project}'
204         - gerrit-parameter:
205             branch: '{branch}'
206         - '{slave-label}-defaults'
207         - '{installer}-defaults'
208         - 'fuel-verify-defaults':
209             gs-pathname: '{gs-pathname}'
210
211     builders:
212         - description-setter:
213             description: "Built on $NODE_NAME"
214         - '{project}-verify-{phase}-macro'
215 #####################################
216 # builder macros
217 #####################################
218 - builder:
219     name: 'fuel-verify-basic-macro'
220     builders:
221         - shell: |
222             #!/bin/bash
223
224             echo "Not activated!"
225
226 - builder:
227     name: 'fuel-verify-build-macro'
228     builders:
229         - shell:
230             !include-raw: ./fuel-build.sh
231         - shell:
232             !include-raw: ./fuel-workspace-cleanup.sh
233
234 - builder:
235     name: 'fuel-verify-deploy-virtual-macro'
236     builders:
237         - shell: |
238             #!/bin/bash
239
240             echo "Not activated!"
241
242 - builder:
243     name: 'fuel-verify-smoke-test-macro'
244     builders:
245         - shell: |
246             #!/bin/bash
247
248             echo "Not activated!"
249 #####################################
250 # parameter macros
251 #####################################
252 - parameter:
253     name: 'fuel-verify-defaults'
254     parameters:
255         - string:
256             name: BUILD_DIRECTORY
257             default: $WORKSPACE/build_output
258             description: "Directory where the build artifact will be located upon the completion of the build."
259         - string:
260             name: CACHE_DIRECTORY
261             default: $HOME/opnfv/cache/$INSTALLER_TYPE
262             description: "Directory where the cache to be used during the build is located."
263         - string:
264             name: GS_URL
265             default: artifacts.opnfv.org/$PROJECT{gs-pathname}
266             description: "URL to Google Storage."