82532b2b80e2617dcf6bf756653c591cc5726e62
[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         - gerrit-parameter:
87             branch: '{branch}'
88         - 'opnfv-build-defaults'
89         - 'daisy4nfv-verify-defaults':
90             gs-pathname: '{gs-pathname}'
91
92     builders:
93         - description-setter:
94             description: "Built on $NODE_NAME"
95         - multijob:
96             name: basic
97             condition: SUCCESSFUL
98             projects:
99                 - name: 'daisy4nfv-verify-basic-{stream}'
100                   current-parameters: false
101                   predefined-parameters: |
102                     GERRIT_BRANCH=$GERRIT_BRANCH
103                     GERRIT_REFSPEC=$GERRIT_REFSPEC
104                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
105                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
106                   node-parameters: false
107                   kill-phase-on: FAILURE
108                   abort-all-job: true
109         - multijob:
110             name: build
111             condition: SUCCESSFUL
112             projects:
113                 - name: 'daisy4nfv-verify-build-{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                   node-parameters: false
121                   kill-phase-on: FAILURE
122                   abort-all-job: true
123         - multijob:
124             name: deploy-virtual
125             condition: SUCCESSFUL
126             projects:
127                 - name: 'daisy4nfv-verify-deploy-virtual-{stream}'
128                   current-parameters: false
129                   predefined-parameters: |
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: smoke-test
139             condition: SUCCESSFUL
140             projects:
141                 - name: 'daisy4nfv-verify-smoke-test-{stream}'
142                   current-parameters: false
143                   predefined-parameters: |
144                     GERRIT_BRANCH=$GERRIT_BRANCH
145                     GERRIT_REFSPEC=$GERRIT_REFSPEC
146                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
147                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
148                   node-parameters: false
149                   kill-phase-on: FAILURE
150                   abort-all-job: true
151
152 - job-template:
153     name: 'daisy4nfv-verify-{phase}-{stream}'
154
155     disabled: '{obj:disabled}'
156
157     concurrent: true
158
159     properties:
160         - logrotate-default
161         - throttle:
162             enabled: true
163             max-total: 6
164             option: 'project'
165         - build-blocker:
166             use-build-blocker: true
167             blocking-jobs:
168                 - 'daisy4nfv-verify-deploy-.*'
169                 - 'daisy4nfv-verify-test-.*'
170             block-level: 'NODE'
171
172     scm:
173         - git-scm-gerrit
174
175     wrappers:
176         - ssh-agent-wrapper
177         - timeout:
178             timeout: 360
179             fail: true
180
181     parameters:
182         - project-parameter:
183             project: '{project}'
184         - gerrit-parameter:
185             branch: '{branch}'
186         - '{slave-label}-defaults'
187         - 'daisy4nfv-verify-defaults':
188             gs-pathname: '{gs-pathname}'
189
190     builders:
191         - description-setter:
192             description: "Built on $NODE_NAME"
193         - '{project}-verify-{phase}-macro'
194 #####################################
195 # builder macros
196 #####################################
197 - builder:
198     name: 'daisy-verify-basic-macro'
199     builders:
200         - shell:
201             !include-raw: ./daisy4nfv-basic.sh
202
203 - builder:
204     name: 'daisy-verify-build-macro'
205     builders:
206         - shell:
207             !include-raw: ./daisy4nfv-build.sh
208
209 - builder:
210     name: 'daisy-verify-deploy-virtual-macro'
211     builders:
212         - shell:
213             !include-raw: ./daisy4nfv-virtual-deploy.sh
214
215 - builder:
216     name: 'daisy-verify-smoke-test-macro'
217     builders:
218         - shell: |
219             #!/bin/bash
220
221             echo "Not activated!"
222 #####################################
223 # parameter macros
224 #####################################
225 - parameter:
226     name: 'daisy4nfv-verify-defaults'
227     parameters:
228         - string:
229             name: BUILD_DIRECTORY
230             default: $WORKSPACE/build_output
231             description: "Directory where the build artifact will be located upon the completion of the build."
232         - string:
233             name: CACHE_DIRECTORY
234             default: $HOME/opnfv/cache/$INSTALLER_TYPE
235             description: "Directory where the cache to be used during the build is located."
236         - string:
237             name: GS_URL
238             default: artifacts.opnfv.org/$PROJECT{gs-pathname}
239             description: "URL to Google Storage."