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