e0bc2183ff7dfae7a15d0c6eaba84c15c8273ff2
[releng.git] / jjb / sandbox / sandbox-verify-jobs.yml
1 - project:
2     name: 'sandbox-verify-jobs'
3
4     project: 'sandbox'
5
6     installer: 'sandbox'
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: 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: 'sandbox-virtual'
29         - 'smoke-test':
30             slave-label: 'sandbox-virtual'
31 #####################################
32 # jobs
33 #####################################
34     jobs:
35         - 'sandbox-verify-{stream}'
36         - 'sandbox-verify-{phase}-{stream}'
37 #####################################
38 # job templates
39 #####################################
40 - job-template:
41     name: 'sandbox-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: 2
53             max-per-node: 1
54             option: 'project'
55         - build-blocker:
56             use-build-blocker: true
57             blocking-jobs:
58                 - 'sandbox-verify-master'
59                 - 'sandbox-verify-colorado'
60             block-level: 'NODE'
61
62     scm:
63         - gerrit-trigger-scm:
64             credentials-id: '{ssh-credentials}'
65             refspec: '$GERRIT_REFSPEC'
66             choosing-strategy: 'gerrit'
67
68     wrappers:
69         - ssh-agent-credentials:
70             users:
71                 - '{ssh-credentials}'
72         - timeout:
73             timeout: 360
74             fail: true
75
76     triggers:
77         - gerrit:
78             trigger-on:
79                 - patchset-created-event:
80                     exclude-drafts: 'false'
81                     exclude-trivial-rebase: 'false'
82                     exclude-no-code-change: 'false'
83                 - draft-published-event
84                 - comment-added-contains-event:
85                     comment-contains-value: 'recheck'
86                 - comment-added-contains-event:
87                     comment-contains-value: 'reverify'
88             projects:
89               - project-compare-type: 'ANT'
90                 project-pattern: '{project}'
91                 branches:
92                   - branch-compare-type: 'ANT'
93                     branch-pattern: '**/{branch}'
94                 forbidden-file-paths:
95                   - compare-type: ANT
96                     pattern: 'docs/**|.gitignore'
97             readable-message: true
98
99     parameters:
100         - project-parameter:
101             project: '{project}'
102         - gerrit-parameter:
103             branch: '{branch}'
104         - 'sandbox-virtual-defaults'
105
106     builders:
107         - description-setter:
108             description: "Built on $NODE_NAME"
109         - multijob:
110             name: basic
111             condition: SUCCESSFUL
112             projects:
113                 - name: 'sandbox-verify-basic-{stream}'
114                   current-parameters: false
115                   predefined-parameters: |
116                     GERRIT_BRANCH=$GERRIT_BRANCH
117                     GERRIT_REFSPEC=$GERRIT_REFSPEC
118                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
119                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
120                   kill-phase-on: FAILURE
121                   abort-all-job: true
122         - multijob:
123             name: build
124             condition: SUCCESSFUL
125             projects:
126                 - name: 'sandbox-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                   kill-phase-on: FAILURE
134                   abort-all-job: true
135         - multijob:
136             name: deploy-virtual
137             condition: SUCCESSFUL
138             projects:
139                 - name: 'sandbox-verify-deploy-virtual-{stream}'
140                   current-parameters: false
141                   predefined-parameters: |
142                     GERRIT_BRANCH=$GERRIT_BRANCH
143                     GERRIT_REFSPEC=$GERRIT_REFSPEC
144                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
145                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
146                   node-parameters: true
147                   kill-phase-on: FAILURE
148                   abort-all-job: true
149         - multijob:
150             name: smoke-test
151             condition: SUCCESSFUL
152             projects:
153                 - name: 'sandbox-verify-smoke-test-{stream}'
154                   current-parameters: false
155                   predefined-parameters: |
156                     GERRIT_BRANCH=$GERRIT_BRANCH
157                     GERRIT_REFSPEC=$GERRIT_REFSPEC
158                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
159                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
160                   node-parameters: true
161                   kill-phase-on: FAILURE
162                   abort-all-job: true
163
164 - job-template:
165     name: 'sandbox-verify-{phase}-{stream}'
166
167     disabled: '{obj:disabled}'
168
169     concurrent: true
170
171     properties:
172         - throttle:
173             enabled: true
174             max-total: 2
175             max-per-node: 1
176             option: 'project'
177         - build-blocker:
178             use-build-blocker: true
179             blocking-jobs:
180                 - 'sandbox-verify-deploy-.*'
181                 - 'sandbox-verify-test-.*'
182             block-level: 'NODE'
183
184     scm:
185         - gerrit-trigger-scm:
186             credentials-id: '{ssh-credentials}'
187             refspec: '$GERRIT_REFSPEC'
188             choosing-strategy: 'gerrit'
189
190     wrappers:
191         - ssh-agent-credentials:
192             users:
193                 - '{ssh-credentials}'
194         - timeout:
195             timeout: 360
196             fail: true
197     parameters:
198         - project-parameter:
199             project: '{project}'
200         - gerrit-parameter:
201             branch: '{branch}'
202         - '{installer}-defaults'
203         - '{slave-label}-defaults'
204
205     builders:
206         - description-setter:
207             description: "Built on $NODE_NAME"
208         - '{project}-verify-{phase}-macro'
209 #####################################
210 # builder macros
211 #####################################
212 - builder:
213     name: 'sandbox-verify-basic-macro'
214     builders:
215         - shell:
216             !include-raw: ./basic.sh
217
218 - builder:
219     name: 'sandbox-verify-build-macro'
220     builders:
221         - shell:
222             !include-raw: ./build.sh
223
224 - builder:
225     name: 'sandbox-verify-deploy-virtual-macro'
226     builders:
227         - shell:
228             !include-raw: ./deploy.sh
229
230 - builder:
231     name: 'sandbox-verify-smoke-test-macro'
232     builders:
233         - shell:
234             !include-raw: ./test.sh