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