cf893832baa08aa9f4c65b98c228b9e7124aa8ba
[releng.git] / jjb / fuel / fuel-project-jobs.yml
1 ########################
2 # Job configuration for fuel
3 ########################
4 - project:
5     name: fuel-project-jobs
6
7     project: 'fuel'
8
9     installer: 'fuel'
10
11     stream:
12         - master:
13             branch: '{stream}'
14             gs-pathname: ''
15             disabled: false
16         - colorado:
17             branch: 'stable/{stream}'
18             gs-pathname: '/{stream}'
19             disabled: false
20
21     jobs:
22         - 'fuel-build-daily-{stream}'
23         - 'fuel-merge-build-{stream}'
24         - 'fuel-merge-deploy-virtual-{stream}'
25         - 'fuel-deploy-generic-daily-{stream}'
26
27 ########################
28 # job templates
29 ########################
30 - job-template:
31     name: 'fuel-build-daily-{stream}'
32
33     disabled: '{obj:disabled}'
34
35     concurrent: false
36
37     properties:
38         - throttle:
39             enabled: true
40             max-total: 1
41             max-per-node: 1
42             option: 'project'
43
44     parameters:
45         - project-parameter:
46             project: '{project}'
47         - 'opnfv-build-ubuntu-defaults'
48         - '{installer}-defaults'
49         - choice:
50             name: FORCE_BUILD
51             choices:
52               - 'false'
53               - 'true'
54             description: "Force build even if there is no changes in fuel repo. Default false"
55         - fuel-project-parameter:
56             gs-pathname: '{gs-pathname}'
57
58     scm:
59         - git-scm:
60             credentials-id: '{ssh-credentials}'
61             refspec: ''
62             branch: '{branch}'
63
64     triggers:
65         - timed: '0 H/4 * * *'
66
67     wrappers:
68         - timeout:
69             timeout: 360
70             fail: true
71
72     builders:
73         - shell:
74             !include-raw-escape: ./fuel-build.sh
75         - shell:
76             !include-raw-escape: ./fuel-upload-artifact.sh
77         - shell:
78             !include-raw-escape: ./fuel-workspace-cleanup.sh
79
80     publishers:
81         - email:
82             recipients: jonas.bjurel@ericsson.com stefan.k.berg@ericsson.com
83
84 - job-template:
85     name: 'fuel-merge-build-{stream}'
86
87     disabled: '{obj:disabled}'
88
89     concurrent: true
90
91     parameters:
92         - project-parameter:
93             project: '{project}'
94         - gerrit-parameter:
95             branch: '{branch}'
96         - 'opnfv-build-ubuntu-defaults'
97         - '{installer}-defaults'
98         - fuel-project-parameter:
99             gs-pathname: '{gs-pathname}'
100
101     scm:
102         - gerrit-trigger-scm:
103             credentials-id: '{ssh-credentials}'
104             refspec: ''
105             choosing-strategy: 'default'
106
107     wrappers:
108         - ssh-agent-credentials:
109             users:
110                 - '{ssh-credentials}'
111         - timeout:
112             timeout: 360
113             fail: true
114
115     triggers:
116         - gerrit:
117             trigger-on:
118                 - change-merged-event
119                 - comment-added-contains-event:
120                     comment-contains-value: 'remerge'
121             projects:
122               - project-compare-type: 'ANT'
123                 project-pattern: '{project}'
124                 branches:
125                     - branch-compare-type: 'ANT'
126                       branch-pattern: '**/{branch}'
127                 file-paths:
128                   - compare-type: ANT
129                     pattern: 'ci/**'
130                   - compare-type: ANT
131                     pattern: 'build/**'
132                   - compare-type: ANT
133                     pattern: 'deploy/**'
134                 forbidden-file-paths:
135                   - compare-type: ANT
136                     pattern: 'docs/**'
137
138     builders:
139         - shell:
140             !include-raw-escape: ./fuel-build.sh
141         - shell:
142             !include-raw-escape: ./fuel-upload-artifact.sh
143         - shell:
144             !include-raw-escape: ./fuel-workspace-cleanup.sh
145
146 - job-template:
147     name: 'fuel-merge-deploy-virtual-{stream}'
148
149     disabled: true
150
151     concurrent: true
152
153     properties:
154         - throttle:
155             enabled: true
156             max-total: 2
157             max-per-node: 1
158             option: 'project'
159         - build-blocker:
160             use-build-blocker: true
161             blocking-jobs:
162                 - 'fuel-os-.*?-virtual-daily-.*'
163                 - 'fuel-merge-deploy-virtual-.*'
164             block-level: 'NODE'
165
166     parameters:
167         - project-parameter:
168             project: '{project}'
169         - gerrit-parameter:
170             branch: '{branch}'
171         - 'fuel-virtual-defaults':
172             installer: '{installer}'
173         - '{installer}-defaults'
174         - fuel-project-parameter:
175             gs-pathname: '{gs-pathname}'
176     scm:
177         - gerrit-trigger-scm:
178             credentials-id: '{ssh-credentials}'
179             refspec: ''
180             choosing-strategy: 'default'
181
182     wrappers:
183         - ssh-agent-credentials:
184             users:
185                 - '{ssh-credentials}'
186
187     triggers:
188         - gerrit:
189             trigger-on:
190                 - change-merged-event
191                 - comment-added-contains-event:
192                     comment-contains-value: 'remerge'
193             projects:
194               - project-compare-type: 'ANT'
195                 project-pattern: '{project}'
196                 branches:
197                     - branch-compare-type: 'ANT'
198                       branch-pattern: '**/{branch}'
199                 file-paths:
200                   - compare-type: ANT
201                     pattern: 'ci/**'
202                   - compare-type: ANT
203                     pattern: 'build/**'
204                   - compare-type: ANT
205                     pattern: 'deploy/**'
206                 forbidden-file-paths:
207                   - compare-type: ANT
208                     pattern: 'docs/**'
209             dependency-jobs: 'fuel-merge-build-{stream}'
210
211     builders:
212         - shell:
213             !include-raw-escape: ./fuel-download-artifact.sh
214         - shell:
215             !include-raw-escape: ./fuel-deploy.sh
216         - shell:
217             !include-raw-escape: ./fuel-workspace-cleanup.sh
218
219     publishers:
220         - email:
221             recipients: jonas.bjurel@ericsson.com stefan.k.berg@ericsson.com
222
223 - job-template:
224     name: 'fuel-deploy-generic-daily-{stream}'
225
226     concurrent: true
227
228     disabled: '{obj:disabled}'
229
230     properties:
231         - throttle:
232             enabled: true
233             max-per-node: 1
234             option: 'project'
235         - build-blocker:
236             use-build-blocker: true
237             blocking-jobs:
238                 - 'fuel-os-.*?-daily-.*'
239                 - 'fuel-deploy-generic-daily-.*'
240             block-level: 'NODE'
241
242     parameters:
243         - project-parameter:
244             project: '{project}'
245         - '{installer}-defaults'
246         - string:
247             name: GIT_BASE
248             default: https://gerrit.opnfv.org/gerrit/$PROJECT
249             description: 'Git URL to use on this Jenkins Slave'
250         - string:
251             name: DEPLOY_SCENARIO
252             default: 'os-odl_l2-nofeature-ha'
253         - node:
254             name: SLAVE_NAME
255             description: 'Slave name on Jenkins'
256             allowed-slaves:
257                 - ericsson-pod2
258                 - lf-pod2
259                 - ericsson-pod1
260             default-slaves:
261                 - ericsson-pod2
262         - fuel-project-parameter:
263             gs-pathname: '{gs-pathname}'
264
265     scm:
266         - git-scm:
267             credentials-id: '{ssh-credentials}'
268             refspec: ''
269             branch: '{branch}'
270
271     wrappers:
272         - build-name:
273             name: '$BUILD_NUMBER - POD: $NODE_NAME Scenario: $DEPLOY_SCENARIO'
274
275     builders:
276         - shell:
277             !include-raw-escape: ./fuel-download-artifact.sh
278         - shell:
279             !include-raw-escape: ./fuel-deploy.sh
280
281 ########################
282 # parameter macros
283 ########################
284 - parameter:
285     name: fuel-project-parameter
286     parameters:
287         - string:
288             name: BUILD_DIRECTORY
289             default: $WORKSPACE/build_output
290             description: "Directory where the build artifact will be located upon the completion of the build."
291         - string:
292             name: CACHE_DIRECTORY
293             default: $HOME/opnfv/cache/$INSTALLER_TYPE
294             description: "Directory where the cache to be used during the build is located."
295         - string:
296             name: GS_URL
297             default: artifacts.opnfv.org/$PROJECT{gs-pathname}
298             description: "URL to Google Storage."