merge GIT_BRANCH and GERRIT_BRANCH into BRANCH
[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         - logrotate-default
45         - throttle:
46             enabled: true
47             max-total: 4
48             option: 'project'
49
50     scm:
51         - git-scm-gerrit
52
53     wrappers:
54         - ssh-agent-wrapper
55         - timeout:
56             timeout: 360
57             fail: true
58
59     triggers:
60         - gerrit:
61             server-name: 'gerrit.opnfv.org'
62             trigger-on:
63                 - patchset-created-event:
64                     exclude-drafts: 'false'
65                     exclude-trivial-rebase: 'false'
66                     exclude-no-code-change: 'false'
67                 - draft-published-event
68                 - comment-added-contains-event:
69                     comment-contains-value: 'recheck'
70                 - comment-added-contains-event:
71                     comment-contains-value: 'reverify'
72             projects:
73               - project-compare-type: 'ANT'
74                 project-pattern: '{project}'
75                 branches:
76                   - branch-compare-type: 'ANT'
77                     branch-pattern: '**/{branch}'
78                 forbidden-file-paths:
79                   - compare-type: ANT
80                     pattern: 'docs/**|.gitignore'
81             readable-message: true
82
83     parameters:
84         - project-parameter:
85             project: '{project}'
86             branch: '{branch}'
87         - 'opnfv-build-defaults'
88         - 'daisy4nfv-verify-defaults':
89             gs-pathname: '{gs-pathname}'
90
91     builders:
92         - description-setter:
93             description: "Built on $NODE_NAME"
94         - multijob:
95             name: basic
96             condition: SUCCESSFUL
97             projects:
98                 - name: 'daisy4nfv-verify-basic-{stream}'
99                   current-parameters: false
100                   predefined-parameters: |
101                     BRANCH=$BRANCH
102                     GERRIT_REFSPEC=$GERRIT_REFSPEC
103                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
104                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
105                   node-parameters: false
106                   kill-phase-on: FAILURE
107                   abort-all-job: true
108         - multijob:
109             name: build
110             condition: SUCCESSFUL
111             projects:
112                 - name: 'daisy4nfv-verify-build-{stream}'
113                   current-parameters: false
114                   predefined-parameters: |
115                     BRANCH=$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: deploy-virtual
124             condition: SUCCESSFUL
125             projects:
126                 - name: 'daisy4nfv-verify-deploy-virtual-{stream}'
127                   current-parameters: false
128                   predefined-parameters: |
129                     BRANCH=$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: smoke-test
138             condition: SUCCESSFUL
139             projects:
140                 - name: 'daisy4nfv-verify-smoke-test-{stream}'
141                   current-parameters: false
142                   predefined-parameters: |
143                     BRANCH=$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
151 - job-template:
152     name: 'daisy4nfv-verify-{phase}-{stream}'
153
154     disabled: '{obj:disabled}'
155
156     concurrent: true
157
158     properties:
159         - logrotate-default
160         - throttle:
161             enabled: true
162             max-total: 6
163             option: 'project'
164         - build-blocker:
165             use-build-blocker: true
166             blocking-jobs:
167                 - 'daisy4nfv-verify-deploy-.*'
168                 - 'daisy4nfv-verify-test-.*'
169             block-level: 'NODE'
170
171     scm:
172         - git-scm-gerrit
173
174     wrappers:
175         - ssh-agent-wrapper
176         - timeout:
177             timeout: 360
178             fail: true
179
180     parameters:
181         - project-parameter:
182             project: '{project}'
183             branch: '{branch}'
184         - '{slave-label}-defaults'
185         - 'daisy4nfv-verify-defaults':
186             gs-pathname: '{gs-pathname}'
187
188     builders:
189         - description-setter:
190             description: "Built on $NODE_NAME"
191         - '{project}-verify-{phase}-macro'
192 #####################################
193 # builder macros
194 #####################################
195 - builder:
196     name: 'daisy-verify-basic-macro'
197     builders:
198         - shell:
199             !include-raw: ./daisy4nfv-basic.sh
200
201 - builder:
202     name: 'daisy-verify-build-macro'
203     builders:
204         - shell:
205             !include-raw: ./daisy4nfv-build.sh
206
207 - builder:
208     name: 'daisy-verify-deploy-virtual-macro'
209     builders:
210         - shell:
211             !include-raw: ./daisy4nfv-virtual-deploy.sh
212
213 - builder:
214     name: 'daisy-verify-smoke-test-macro'
215     builders:
216         - shell: |
217             #!/bin/bash
218
219             echo "Not activated!"
220 #####################################
221 # parameter macros
222 #####################################
223 - parameter:
224     name: 'daisy4nfv-verify-defaults'
225     parameters:
226         - string:
227             name: BUILD_DIRECTORY
228             default: $WORKSPACE/build_output
229             description: "Directory where the build artifact will be located upon the completion of the build."
230         - string:
231             name: CACHE_DIRECTORY
232             default: $HOME/opnfv/cache/$INSTALLER_TYPE
233             description: "Directory where the cache to be used during the build is located."
234         - string:
235             name: GS_URL
236             default: artifacts.opnfv.org/$PROJECT{gs-pathname}
237             description: "URL to Google Storage."