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