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