merge GIT_BRANCH and GERRIT_BRANCH into BRANCH
[releng.git] / jjb / compass4nfv / compass-verify-jobs.yml
1 - project:
2     name: 'compass-verify-jobs'
3
4     project: 'compass4nfv'
5
6     installer: 'compass'
7 #####################################
8 # branch definitions
9 #####################################
10     stream:
11         - master:
12             branch: '{stream}'
13             gs-pathname: ''
14             disabled: false
15         - danube:
16             branch: 'stable/{stream}'
17             gs-pathname: '/{stream}'
18             disabled: false
19
20     distro:
21         - 'xenial':
22             disabled: false
23             os-version: 'xenial'
24             openstack-os-version: ''
25         - 'centos7':
26             disabled: false
27             os-version: 'centos7'
28             openstack-os-version: ''
29 #####################################
30 # patch verification phases
31 #####################################
32     phase:
33         - 'basic'
34         - 'deploy-virtual'
35 #####################################
36 # jobs
37 #####################################
38     jobs:
39         - 'compass-verify-{distro}-{stream}'
40         - 'compass-verify-{phase}-{distro}-{stream}'
41 #####################################
42 # job templates
43 #####################################
44 - job-template:
45     name: 'compass-verify-{distro}-{stream}'
46
47     project-type: multijob
48
49     disabled: '{obj:disabled}'
50
51     concurrent: true
52
53     properties:
54         - logrotate-default
55         - throttle:
56             enabled: true
57             max-total: 4
58             max-per-node: 1
59             option: 'project'
60         - build-blocker:
61             use-build-blocker: true
62             blocking-jobs:
63                 - 'compass-verify-[^-]*-[^-]*'
64                 - 'compass-os-.*?-virtual-daily-.*?'
65             block-level: 'NODE'
66
67     scm:
68         - git-scm-gerrit
69
70     wrappers:
71         - ssh-agent-wrapper
72         - timeout:
73             timeout: 120
74             fail: true
75
76     triggers:
77         - gerrit:
78             server-name: 'gerrit.opnfv.org'
79             trigger-on:
80                 - patchset-created-event:
81                     exclude-drafts: 'false'
82                     exclude-trivial-rebase: 'false'
83                     exclude-no-code-change: 'false'
84                 - draft-published-event
85                 - comment-added-contains-event:
86                     comment-contains-value: 'recheck'
87                 - comment-added-contains-event:
88                     comment-contains-value: 'reverify'
89             projects:
90               - project-compare-type: 'ANT'
91                 project-pattern: '{project}'
92                 branches:
93                   - branch-compare-type: 'ANT'
94                     branch-pattern: '**/{branch}'
95                 file-paths:
96                   - compare-type: ANT
97                     pattern: '**/*'
98                 forbidden-file-paths:
99                   - compare-type: ANT
100                     pattern: 'docs/**'
101             readable-message: true
102
103     parameters:
104         - project-parameter:
105             project: '{project}'
106             branch: '{branch}'
107         - 'compass-virtual-defaults'
108         - '{installer}-defaults'
109         - 'compass-verify-defaults':
110             installer: '{installer}'
111             gs-pathname: '{gs-pathname}'
112         - string:
113             name: DEPLOY_SCENARIO
114             default: 'os-nosdn-nofeature-ha'
115
116     builders:
117         - description-setter:
118             description: "Built on $NODE_NAME"
119         - multijob:
120             name: basic
121             condition: SUCCESSFUL
122             projects:
123                 - name: 'opnfv-lint-verify-{stream}'
124                   current-parameters: true
125                   node-parameters: true
126                   kill-phase-on: FAILURE
127                   abort-all-job: true
128         - multijob:
129             name: deploy-virtual
130             condition: SUCCESSFUL
131             projects:
132                 - name: 'compass-verify-deploy-virtual-{distro}-{stream}'
133                   current-parameters: true
134                   predefined-parameters: |
135                     COMPASS_OS_VERSION={os-version}
136                   node-parameters: true
137                   kill-phase-on: FAILURE
138                   abort-all-job: true
139         - multijob:
140             name: smoke-test
141             condition: SUCCESSFUL
142             projects:
143                 - name: 'functest-compass-virtual-suite-{stream}'
144                   current-parameters: true
145                   predefined-parameters:
146                     FUNCTEST_SUITE_NAME=healthcheck
147                   node-parameters: true
148                   kill-phase-on: NEVER
149                   abort-all-job: true
150                 - name: 'functest-compass-virtual-suite-{stream}'
151                   current-parameters: true
152                   predefined-parameters:
153                     FUNCTEST_SUITE_NAME=vping_ssh
154                   node-parameters: true
155                   kill-phase-on: NEVER
156                   abort-all-job: true
157
158 - job-template:
159     name: 'compass-verify-{phase}-{distro}-{stream}'
160
161     disabled: '{obj:disabled}'
162
163     concurrent: true
164
165     properties:
166         - logrotate-default
167         - throttle:
168             enabled: true
169             max-per-node: 1
170             option: 'project'
171         - build-blocker:
172             use-build-blocker: true
173             blocking-jobs:
174                 - 'compass-os-.*?-virtual-daily-.*?'
175                 - 'compass-verify-deploy-.*'
176                 - 'functest-compass-virtual.*'
177             block-level: 'NODE'
178
179     scm:
180         - git-scm-gerrit
181
182     wrappers:
183         - ssh-agent-wrapper
184         - timeout:
185             timeout: 120
186             fail: true
187
188     builders:
189         - description-setter:
190             description: "Built on $NODE_NAME"
191         - '{project}-verify-{phase}-macro'
192
193     publishers:
194         - archive:
195             artifacts: 'ansible.log'
196             allow-empty: 'true'
197             fingerprint: true
198 #####################################
199 # builder macros
200 #####################################
201 - builder:
202     name: 'compass4nfv-verify-basic-macro'
203     builders:
204         - shell: |
205             #!/bin/bash
206
207             echo "Not activated!"
208
209 - builder:
210     name: 'compass4nfv-verify-deploy-virtual-macro'
211     builders:
212         - shell:
213             !include-raw: ./compass-build.sh
214         - shell:
215             !include-raw: ./compass-deploy.sh
216 #####################################
217 # parameter macros
218 #####################################
219 - parameter:
220     name: 'compass-verify-defaults'
221     parameters:
222         - string:
223             name: BUILD_DIRECTORY
224             default: $WORKSPACE/build_output
225             description: "Directory where the build artifact will be located upon the completion of the build."
226         - string:
227             name: CACHE_DIRECTORY
228             default: "$HOME/opnfv/cache/$PROJECT{gs-pathname}"
229             description: "Directory where the cache to be used during the build is located."
230         - string:
231             name: GS_URL
232             default: '$GS_BASE{gs-pathname}'
233             description: "URL to Google Storage."
234         - string:
235             name: PPA_REPO
236             default: "http://205.177.226.237:9999{gs-pathname}"
237         - string:
238             name: PPA_CACHE
239             default: "$WORKSPACE/work/repo/"
240         - choice:
241             name: COMPASS_OPENSTACK_VERSION
242             choices:
243                 - 'newton'
244         - choice:
245             name: COMPASS_OS_VERSION
246             choices:
247                 - 'xenial'
248                 - 'centos7'