4fea26b32b05f3d993d43570503f36e82c97164e
[releng.git] / jjb / fuel / fuel-plugin-verify-jobs.yml
1 - project:
2     name: 'fuel-plugin-verify-jobs'
3
4     project: 'fuel-plugin'
5
6     installer: 'fuel'
7 #####################################
8 # branch definitions
9 #####################################
10     stream:
11         - master:
12             upstream-branch: '{stream}'
13             opnfv-branch: 'experimental'
14             gs-pathname: ''
15             disabled: false
16 #####################################
17 # patch verification phases
18 #####################################
19     phase:
20         - 'build':
21             slave-label: 'opnfv-build-ubuntu'
22         - 'test':
23             slave-label: 'opnfv-build-ubuntu'
24 #####################################
25 # jobs
26 #####################################
27     jobs:
28         - 'fuel-verify-plugin-{stream}'
29         - 'fuel-verify-plugin-{phase}-{stream}'
30 #####################################
31 # job templates
32 #####################################
33 - job-template:
34     name: 'fuel-verify-plugin-{stream}'
35
36     project-type: multijob
37
38     disabled: '{obj:disabled}'
39
40     concurrent: true
41
42     properties:
43         - throttle:
44             enabled: true
45             max-total: 4
46             option: 'project'
47
48     parameters:
49         - project-parameter:
50             project: '{project}'
51         - gerrit-parameter:
52             branch: '{upstream-branch}'
53             description: 'OpenStack branch to use'
54         - string:
55             name: OPNFV_BRANCH
56             default: '{opnfv-branch}'
57             description: 'OPNFV branch to use'
58         - 'opnfv-build-defaults'
59         - 'fuel-verify-plugin-defaults':
60             gs-pathname: '{gs-pathname}'
61
62     scm:
63         - git:
64             url: 'https://git.openstack.org/$GERRIT_PROJECT'
65             refspec: '$GERRIT_REFSPEC'
66             branches:
67                 - 'origin/$GERRIT_BRANCH'
68             skip-tag: true
69             choosing-strategy: 'gerrit'
70             timeout: 10
71             wipe-workspace: true
72
73     wrappers:
74         - ssh-agent-credentials:
75             users:
76                 - '{ssh-credentials}'
77         - timeout:
78             timeout: 360
79             fail: true
80
81     triggers:
82         - gerrit:
83             server-name: 'review.openstack.org'
84             silent-start: false
85             skip-vote:
86                 successful: true
87                 failed: true
88                 unstable: true
89                 notbuilt: true
90             escape-quotes: true
91             trigger-on:
92                 - patchset-created-event:
93                     exclude-drafts: 'false'
94                     exclude-trivial-rebase: 'false'
95                     exclude-no-code-change: 'false'
96                 - comment-added-contains-event:
97                     comment-contains-value: 'recheck'
98                 - comment-added-contains-event:
99                     comment-contains-value: 'reverify'
100             projects:
101               - project-compare-type: 'PLAIN'
102                 project-pattern: 'openstack/fuel-plugin-bgpvpn'
103                 branches:
104                   - branch-compare-type: 'ANT'
105                     branch-pattern: '**/{upstream-branch}'
106                 forbidden-file-paths:
107                   - compare-type: ANT
108                     pattern: 'README.md|.gitignore|.gitreview'
109               - project-compare-type: 'PLAIN'
110                 project-pattern: 'openstack/fuel-plugin-onos'
111                 branches:
112                   - branch-compare-type: 'ANT'
113                     branch-pattern: '**/{upstream-branch}'
114                 forbidden-file-paths:
115                   - compare-type: ANT
116                     pattern: 'README.md|.gitignore|.gitreview'
117             readable-message: true
118
119     builders:
120         - description-setter:
121             description: "Built on $NODE_NAME"
122         - multijob:
123             name: build
124             condition: SUCCESSFUL
125             projects:
126                 - name: 'fuel-verify-plugin-build-{stream}'
127                   current-parameters: false
128                   predefined-parameters: |
129                     GERRIT_PROJECT=$GERRIT_PROJECT
130                     GERRIT_BRANCH=$GERRIT_BRANCH
131                     GERRIT_REFSPEC=$GERRIT_REFSPEC
132                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
133                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
134                   node-parameters: false
135                   kill-phase-on: FAILURE
136                   abort-all-job: true
137         - multijob:
138             name: test
139             condition: SUCCESSFUL
140             projects:
141                 - name: 'fuel-verify-plugin-test-{stream}'
142                   current-parameters: false
143                   predefined-parameters: |
144                     GERRIT_PROJECT=$GERRIT_PROJECT
145                     GERRIT_BRANCH=$GERRIT_BRANCH
146                     GERRIT_REFSPEC=$GERRIT_REFSPEC
147                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
148                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
149                   node-parameters: false
150                   kill-phase-on: FAILURE
151                   abort-all-job: true
152
153 - job-template:
154     name: 'fuel-verify-plugin-{phase}-{stream}'
155
156     disabled: '{obj:disabled}'
157
158     concurrent: true
159
160     properties:
161         - throttle:
162             enabled: true
163             max-total: 6
164             option: 'project'
165         - build-blocker:
166             use-build-blocker: true
167             blocking-jobs:
168                 - 'fuel-verify-plugin-test-.*'
169             block-level: 'NODE'
170
171     parameters:
172         - project-parameter:
173             project: '{project}'
174         - gerrit-parameter:
175             branch: '{upstream-branch}'
176             description: 'OpenStack branch to use'
177         - string:
178             name: OPNFV_BRANCH
179             default: '{opnfv-branch}'
180             description: 'OPNFV branch to use'
181         - '{slave-label}-defaults'
182         - '{installer}-defaults'
183         - 'fuel-verify-plugin-defaults':
184             gs-pathname: '{gs-pathname}'
185
186     scm:
187         - git:
188             url: 'https://git.openstack.org/$GERRIT_PROJECT'
189             refspec: '$GERRIT_REFSPEC'
190             branches:
191                 - 'origin/$GERRIT_BRANCH'
192             skip-tag: true
193             choosing-strategy: 'gerrit'
194             timeout: 10
195             wipe-workspace: true
196
197     wrappers:
198         - ssh-agent-credentials:
199             users:
200                 - '{ssh-credentials}'
201         - timeout:
202             timeout: 360
203             fail: true
204
205     builders:
206         - description-setter:
207             description: "Built on $NODE_NAME"
208         - 'fuel-verify-plugin-{phase}-macro'
209 #####################################
210 # builder macros
211 #####################################
212 - builder:
213     name: 'fuel-verify-plugin-build-macro'
214     builders:
215         - shell:
216             !include-raw: ./fuel-plugin-build.sh
217
218 - builder:
219     name: 'fuel-verify-plugin-test-macro'
220     builders:
221         - shell:
222             !include-raw: ./fuel-plugin-test.sh
223 #####################################
224 # parameter macros
225 #####################################
226 - parameter:
227     name: 'fuel-verify-plugin-defaults'
228     parameters:
229         - string:
230             name: BUILD_DIRECTORY
231             default: $WORKSPACE/build_output
232             description: "Directory where the build artifact will be located upon the completion of the build."
233         - string:
234             name: CACHE_DIRECTORY
235             default: $HOME/opnfv/cache/$INSTALLER_TYPE
236             description: "Directory where the cache to be used during the build is located."
237         - string:
238             name: GS_URL
239             default: artifacts.opnfv.org/$PROJECT{gs-pathname}
240             description: "URL to Google Storage."