Merge "Fix Yamllint violations for jjb/xci"
[releng.git] / jjb / xci / bifrost-verify-jobs.yml
1 ---
2 - project:
3     name: 'openstack-bifrost-verify'
4     # -------------------------------
5     # branches
6     # -------------------------------
7     stream:
8       - master:
9           branch: '{stream}'
10     # -------------------------------
11     # projects
12     # -------------------------------
13     project:
14       - 'openstack':
15           project-repo: 'https://git.openstack.org/openstack/bifrost'
16           clone-location: '$WORKSPACE/bifrost'
17       - 'opnfv':
18           project-repo: 'https://gerrit.opnfv.org/gerrit/releng-xci'
19           clone-location: '$WORKSPACE/releng-xci'
20     # -------------------------------
21     # distros
22     # -------------------------------
23     distro:
24       - 'xenial':
25           disabled: true
26           dib-os-release: 'xenial'
27           dib-os-element: 'ubuntu-minimal'
28           dib-os-packages: 'vlan,vim,less,bridge-utils,language-pack-en,iputils-ping,rsyslog,curl'
29           extra-dib-elements: 'openssh-server'
30       - 'centos7':
31           disabled: true
32           dib-os-release: '7'
33           dib-os-element: 'centos-minimal'
34           dib-os-packages: 'vim,less,bridge-utils,iputils,rsyslog,curl'
35           extra-dib-elements: 'openssh-server'
36       - 'suse':
37           disabled: true
38           dib-os-release: '42.3'
39           dib-os-element: 'opensuse-minimal'
40           dib-os-packages: 'vim,less,bridge-utils,iputils,rsyslog,curl'
41           extra-dib-elements: 'openssh-server'
42     # -------------------------------
43     # type
44     # -------------------------------
45     type:
46       - virtual
47     # -------------------------------
48     # jobs
49     # -------------------------------
50     jobs:
51       - '{project}-bifrost-verify-{distro}-{type}-{stream}'
52
53 # -------------------------------
54 # VM defaults
55 # -------------------------------
56 - defaults:
57     name: verify_vm_defaults
58     test-vm-num-nodes: '3'
59     test-vm-node-names: 'opnfv controller00 compute00'
60     vm-domain-type: 'kvm'
61     vm-cpu: '2'
62     vm-disk: '30'
63     vm-memory-size: '4096'
64     vm-disk-cache: 'unsafe'
65
66 # -------------------------------
67 # job templates
68 # -------------------------------
69 - job-template:
70     name: '{project}-bifrost-verify-{distro}-{type}-{stream}'
71
72     disabled: '{obj:disabled}'
73
74     defaults: verify_vm_defaults
75
76     concurrent: false
77
78     properties:
79       - logrotate-default
80       - build-blocker:
81           use-build-blocker: true
82           blocking-jobs:
83             - '.*-bifrost-verify.*-{type}'
84           block-level: 'NODE'
85
86     parameters:
87       - string:
88           name: PROJECT
89           default: '{project}'
90       - string:
91           name: PROJECT_REPO
92           default: '{project-repo}'
93       - string:
94           name: CLONE_LOCATION
95           default: '{clone-location}'
96       - string:
97           name: DISTRO
98           default: '{distro}'
99       - string:
100           name: DIB_OS_RELEASE
101           default: '{dib-os-release}'
102       - string:
103           name: DIB_OS_ELEMENT
104           default: '{dib-os-element}'
105       - string:
106           name: EXTRA_DIB_ELEMENTS
107           default: '{extra-dib-elements}'
108       - string:
109           name: DIB_OS_PACKAGES
110           default: '{dib-os-packages}'
111       - string:
112           name: TEST_VM_NUM_NODES
113           default: '{test-vm-num-nodes}'
114       - string:
115           name: TEST_VM_NODE_NAMES
116           default: '{test-vm-node-names}'
117       - string:
118           name: VM_DOMAIN_TYPE
119           default: '{vm-domain-type}'
120       - string:
121           name: VM_CPU
122           default: '{vm-cpu}'
123       - string:
124           name: VM_DISK
125           default: '{vm-disk}'
126       - string:
127           name: VM_MEMORY_SIZE
128           default: '{vm-memory-size}'
129       - string:
130           name: VM_DISK_CACHE
131           default: '{vm-disk-cache}'
132       - string:
133           name: CLEAN_DIB_IMAGES
134           default: 'true'
135       - label:
136           name: SLAVE_LABEL
137           default: 'infra-{type}-{distro}'
138       # yamllint disable rule:line-length
139       - string:
140           name: BIFROST_LOG_URL
141           default: 'http://artifacts.opnfv.org/cross-community-ci/openstack/bifrost/$GERRIT_NAME/$GERRIT_CHANGE_NUMBER/$GERRIT_PATCHSET_NUMBER/$JOB_NAME'
142       # yamllint enable rule:line-length
143       - string:
144           name: XCI_LOOP
145           default: 'verify'
146
147     scm:
148       - git:
149           url: '$PROJECT_REPO'
150           refspec: '$GERRIT_REFSPEC'
151           branches:
152             - 'origin/$BRANCH'
153           skip-tag: true
154           choosing-strategy: 'gerrit'
155           timeout: 10
156           wipe-workspace: true
157
158     triggers:
159       - '{project}-gerrit-trigger':
160           branch: '{branch}'
161
162     builders:
163       - bifrost-set-name
164       - bifrost-build
165
166     wrappers:
167       - fix-workspace-permissions
168       - build-timeout:
169           timeout: 90
170
171     publishers:
172       # yamllint disable rule:line-length
173       - email:
174           recipients: fatih.degirmenci@ericsson.com yroblamo@redhat.com mchandras@suse.de jack.morgan@intel.com julienjut@gmail.com
175       # yamllint enable rule:line-length
176       - email-jenkins-admins-on-failure
177 # -------------------------------
178 # trigger macros
179 # -------------------------------
180 - trigger:
181     name: 'openstack-gerrit-trigger'
182     triggers:
183       - gerrit:
184           server-name: 'review.openstack.org'
185           escape-quotes: true
186           trigger-on:
187             - patchset-created-event:
188                 exclude-drafts: 'false'
189                 exclude-trivial-rebase: 'false'
190                 exclude-no-code-change: 'false'
191             - comment-added-contains-event:
192                 comment-contains-value: 'recheck'
193           custom-url: '* $JOB_NAME $BIFROST_LOG_URL/index.html'
194           silent-start: true
195           projects:
196             - project-compare-type: 'PLAIN'
197               project-pattern: 'openstack/bifrost'
198               branches:
199                 - branch-compare-type: 'ANT'
200                   branch-pattern: '**/{branch}'
201               disable-strict-forbidden-file-verification: 'true'
202               forbidden-file-paths:
203                 - compare-type: ANT
204                   pattern: 'doc/**'
205                 - compare-type: ANT
206                   pattern: 'releasenotes/**'
207           readable-message: true
208
209 - trigger:
210     name: 'opnfv-gerrit-trigger'
211     triggers:
212       - gerrit:
213           server-name: 'gerrit.opnfv.org'
214           trigger-on:
215             - patchset-created-event:
216                 exclude-drafts: 'false'
217                 exclude-trivial-rebase: 'false'
218                 exclude-no-code-change: 'false'
219             - draft-published-event
220             - comment-added-contains-event:
221                 comment-contains-value: 'recheck'
222             - comment-added-contains-event:
223                 comment-contains-value: 'reverify'
224           custom-url: '* $JOB_NAME $BIFROST_LOG_URL/index.html'
225           projects:
226             - project-compare-type: 'ANT'
227               project-pattern: 'releng-xci'
228               branches:
229                 - branch-compare-type: 'ANT'
230                   branch-pattern: '**/{branch}'
231               file-paths:
232                 - compare-type: ANT
233                   pattern: 'bifrost/**'
234           readable-message: true
235
236 # --------------------------
237 # builder macros
238 # --------------------------
239 - builder:
240     name: bifrost-set-name
241     builders:
242       - description-setter:
243           description: "Built on $NODE_NAME"
244
245 - builder:
246     name: bifrost-build
247     builders:
248       - shell:
249           !include-raw: ./bifrost-verify.sh