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