Restrict Gerrit Triggers to OPNFV Gerrit Server
[releng.git] / jjb / armband / armband-verify-jobs.yml
1 - project:
2     name: 'armband-verify-jobs'
3
4     project: 'armband'
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-arm'
25         - 'build':
26             slave-label: 'opnfv-build-arm'
27         - 'deploy-virtual':
28             slave-label: 'opnfv-build-arm'
29         - 'smoke-test':
30             slave-label: 'opnfv-build-arm'
31 #####################################
32 # jobs
33 #####################################
34     jobs:
35         - 'armband-verify-{stream}'
36         - 'armband-verify-{phase}-{stream}'
37 #####################################
38 # job templates
39 #####################################
40 - job-template:
41     name: 'armband-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: 'patches/**'
93                 forbidden-file-paths:
94                   - compare-type: ANT
95                     pattern: 'docs/**'
96             readable-message: true
97
98     parameters:
99         - project-parameter:
100             project: '{project}'
101         - gerrit-parameter:
102             branch: '{branch}'
103         - 'opnfv-build-arm-defaults'
104         - 'armband-verify-defaults':
105             gs-pathname: '{gs-pathname}'
106
107     builders:
108         - description-setter:
109             description: "Built on $NODE_NAME"
110         - multijob:
111             name: basic
112             condition: SUCCESSFUL
113             projects:
114                 - name: 'armband-verify-basic-{stream}'
115                   current-parameters: false
116                   predefined-parameters: |
117                     GERRIT_BRANCH=$GERRIT_BRANCH
118                     GERRIT_REFSPEC=$GERRIT_REFSPEC
119                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
120                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
121                   node-parameters: false
122                   kill-phase-on: FAILURE
123                   abort-all-job: true
124         - multijob:
125             name: build
126             condition: SUCCESSFUL
127             projects:
128                 - name: 'armband-verify-build-{stream}'
129                   current-parameters: false
130                   predefined-parameters: |
131                     GERRIT_BRANCH=$GERRIT_BRANCH
132                     GERRIT_REFSPEC=$GERRIT_REFSPEC
133                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
134                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
135                   node-parameters: false
136                   kill-phase-on: FAILURE
137                   abort-all-job: true
138         - multijob:
139             name: deploy-virtual
140             condition: SUCCESSFUL
141             projects:
142                 - name: 'armband-verify-deploy-virtual-{stream}'
143                   current-parameters: false
144                   predefined-parameters: |
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         - multijob:
153             name: smoke-test
154             condition: SUCCESSFUL
155             projects:
156                 - name: 'armband-verify-smoke-test-{stream}'
157                   current-parameters: false
158                   predefined-parameters: |
159                     GERRIT_BRANCH=$GERRIT_BRANCH
160                     GERRIT_REFSPEC=$GERRIT_REFSPEC
161                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
162                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
163                   node-parameters: false
164                   kill-phase-on: FAILURE
165                   abort-all-job: true
166
167 - job-template:
168     name: 'armband-verify-{phase}-{stream}'
169
170     disabled: '{obj:disabled}'
171
172     concurrent: true
173
174     properties:
175         - throttle:
176             enabled: true
177             max-total: 6
178             option: 'project'
179         - build-blocker:
180             use-build-blocker: true
181             blocking-jobs:
182                 - 'armband-verify-deploy-.*'
183                 - 'armband-verify-test-.*'
184             block-level: 'NODE'
185
186     scm:
187         - gerrit-trigger-scm:
188             credentials-id: '{ssh-credentials}'
189             refspec: '$GERRIT_REFSPEC'
190             choosing-strategy: 'gerrit'
191
192     wrappers:
193         - ssh-agent-credentials:
194             users:
195                 - '{ssh-credentials}'
196         - timeout:
197             timeout: 360
198             fail: true
199     parameters:
200         - project-parameter:
201             project: '{project}'
202         - gerrit-parameter:
203             branch: '{branch}'
204         - '{slave-label}-defaults'
205         - '{installer}-defaults'
206         - 'armband-verify-defaults':
207             gs-pathname: '{gs-pathname}'
208
209     builders:
210         - description-setter:
211             description: "Built on $NODE_NAME"
212         - '{project}-verify-{phase}-macro'
213 #####################################
214 # builder macros
215 #####################################
216 - builder:
217     name: 'armband-verify-basic-macro'
218     builders:
219         - shell: |
220             #!/bin/bash
221
222             echo "Not activated!"
223
224 - builder:
225     name: 'armband-verify-build-macro'
226     builders:
227         - shell:
228             !include-raw: ./build.sh
229         - shell:
230             !include-raw: ./armband-workspace-cleanup.sh
231
232 - builder:
233     name: 'armband-verify-deploy-virtual-macro'
234     builders:
235         - shell: |
236             #!/bin/bash
237
238             echo "Not activated!"
239
240 - builder:
241     name: 'armband-verify-smoke-test-macro'
242     builders:
243         - shell: |
244             #!/bin/bash
245
246             echo "Not activated!"
247 #####################################
248 # parameter macros
249 #####################################
250 - parameter:
251     name: 'armband-verify-defaults'
252     parameters:
253         - string:
254             name: BUILD_DIRECTORY
255             default: $WORKSPACE/build_output
256             description: "Directory where the build artifact will be located upon the completion of the build."
257         - string:
258             name: CACHE_DIRECTORY
259             default: $HOME/opnfv/cache/$INSTALLER_TYPE
260             description: "Directory where the cache to be used during the build is located."
261         - string:
262             name: GS_URL
263             default: artifacts.opnfv.org/$PROJECT{gs-pathname}
264             description: "URL to Google Storage."