Merge "jjb/releng: fix compass-container $DOCKERFILE"
[releng.git] / jjb / xci / xci-daily-jobs.yaml
1 ---
2 # -------------------------------
3 # These jobs run on a daily basis and deploy OpenStack
4 # using the pinned versions of opnfv/releng, openstack/bifrost
5 # and openstack/openstack-ansible. Due to this, there is no
6 # version/branch is set/passed to jobs and instead the versions
7 # are checked out based on what is configured.
8 # -------------------------------
9 - project:
10     project: 'releng-xci'
11
12     name: 'xci-daily'
13     # -------------------------------
14     # Branch Anchors
15     # -------------------------------
16     master: &master
17       stream: master
18       opnfv-releng-version: master
19       gs-pathname: ''
20     # -------------------------------
21     # Scenarios
22     # -------------------------------
23     scenario:
24       - 'os-nosdn-nofeature-ha':
25           auto-trigger-name: 'daily-trigger-disabled'
26           xci-flavor: 'ha'
27       - 'os-nosdn-nofeature-noha':
28           auto-trigger-name: 'daily-trigger-disabled'
29           xci-flavor: 'noha'
30       - 'os-odl-sfc-ha':
31           auto-trigger-name: 'daily-trigger-disabled'
32           xci-flavor: 'ha'
33       - 'os-odl-sfc-noha':
34           auto-trigger-name: 'daily-trigger-disabled'
35           xci-flavor: 'noha'
36     # -------------------------------
37     # XCI PODs
38     # -------------------------------
39     pod:
40       - virtual:
41           <<: *master
42     # -------------------------------
43     # Supported Distros
44     # -------------------------------
45     distro:
46       - 'xenial':
47           disabled: false
48           slave-label: xci-xenial-virtual
49           dib-os-release: 'xenial'
50           dib-os-element: 'ubuntu-minimal'
51           # yamllint disable rule:line-length
52           dib-os-packages: 'vlan,vim,less,bridge-utils,sudo,language-pack-en,iputils-ping,rsyslog,curl,python,debootstrap,ifenslave,ifenslave-2.6,lsof,lvm2,tcpdump,nfs-kernel-server,chrony,iptabls'
53           # yamllint enable rule:line-length
54           extra-dib-elements: 'openssh-server'
55       - 'centos7':
56           disabled: true
57           slave-label: xci-centos7-virtual
58           dib-os-release: '7'
59           dib-os-element: 'centos7'
60           dib-os-packages: 'vim,less,bridge-utils,iputils,rsyslog,curl'
61           extra-dib-elements: 'openssh-server'
62       - 'suse':
63           disabled: true
64           slave-label: xci-suse-virtual
65           dib-os-release: '42.3'
66           dib-os-element: 'opensuse-minimal'
67           dib-os-packages: 'vim,less,bridge-utils,iputils,rsyslog,curl'
68           extra-dib-elements: 'openssh-server'
69
70     # -------------------------------
71     #        Phases
72     # -------------------------------
73     phase:
74       - 'deploy'
75       - 'functest'
76     # -------------------------------
77     # jobs
78     # -------------------------------
79     jobs:
80       - 'xci-{scenario}-{pod}-{distro}-daily-{stream}'
81       - 'xci-{phase}-{pod}-{distro}-daily-{stream}'
82
83 # -------------------------------
84 # job templates
85 # -------------------------------
86 - job-template:
87     name: 'xci-{scenario}-{pod}-{distro}-daily-{stream}'
88
89     disabled: '{obj:disabled}'
90
91     concurrent: false
92
93     properties:
94       - build-blocker:
95           use-build-blocker: true
96           blocking-jobs:
97             - '^xci-os.*'
98             - '^xci-deploy.*'
99             - '^xci-functest.*'
100             - '^bifrost-.*periodic.*'
101             - '^osa-.*periodic.*'
102           block-level: 'NODE'
103       - logrotate-default
104
105     parameters:
106       - string:
107           name: DEPLOY_SCENARIO
108           default: '{scenario}'
109       - string:
110           name: XCI_FLAVOR
111           default: '{xci-flavor}'
112       - label:
113           name: SLAVE_LABEL
114           default: '{slave-label}'
115       - string:
116           name: CI_LOOP
117           default: 'daily'
118
119     triggers:
120       - '{auto-trigger-name}'
121
122     wrappers:
123       - fix-workspace-permissions
124
125     builders:
126       - description-setter:
127           description: "Built on $NODE_NAME"
128       - trigger-builds:
129           - project: 'xci-deploy-{pod}-{distro}-daily-{stream}'
130             current-parameters: false
131             predefined-parameters: |
132               DEPLOY_SCENARIO=$DEPLOY_SCENARIO
133               XCI_FLAVOR=$XCI_FLAVOR
134               CI_LOOP=$CI_LOOP
135             same-node: true
136             block: true
137       - trigger-builds:
138           - project: 'xci-functest-{pod}-{distro}-daily-{stream}'
139             current-parameters: false
140             predefined-parameters: |
141               DEPLOY_SCENARIO=$DEPLOY_SCENARIO
142               XCI_FLAVOR=$XCI_FLAVOR
143               CI_LOOP=$CI_LOOP
144             same-node: true
145             block: true
146             block-thresholds:
147               build-step-failure-threshold: 'never'
148               failure-threshold: 'never'
149               unstable-threshold: 'FAILURE'
150
151     publishers:
152       # yamllint disable rule:line-length
153       - email:
154           recipients: fatih.degirmenci@ericsson.com yroblamo@redhat.com mchandras@suse.de jack.morgan@intel.com julienjut@gmail.com
155       # yamllint enable rule:line-length
156       - email-jenkins-admins-on-failure
157       - postbuildscript:
158           builders:
159             - role: BOTH
160               build-on:
161                 - ABORTED
162                 - FAILURE
163                 - NOT_BUILT
164                 - SUCCESS
165                 - UNSTABLE
166               build-steps:
167                 - shell: !include-raw: ./xci-cleanup.sh
168           mark-unstable-if-failed: true
169
170 - job-template:
171     name: 'xci-{phase}-{pod}-{distro}-daily-{stream}'
172
173     disabled: '{obj:disabled}'
174
175     concurrent: false
176
177     properties:
178       - build-blocker:
179           use-build-blocker: true
180           blocking-jobs:
181             - '^xci-deploy.*'
182             - '^xci-functest.*'
183             - '^bifrost-.*periodic.*'
184             - '^osa-.*periodic.*'
185           block-level: 'NODE'
186       - logrotate-default
187
188     wrappers:
189       - fix-workspace-permissions
190
191     scm:
192       - git-scm
193
194     parameters:
195       - project-parameter:
196           project: '{project}'
197           branch: '{opnfv-releng-version}'
198       - string:
199           name: GIT_BASE
200           default: https://gerrit.opnfv.org/gerrit/$PROJECT
201       - string:
202           name: DEPLOY_SCENARIO
203           default: 'os-nosdn-nofeature-ha'
204       - string:
205           name: XCI_FLAVOR
206           default: 'ha'
207       - string:
208           name: DISTRO
209           default: '{distro}'
210       - string:
211           name: DIB_OS_RELEASE
212           default: '{dib-os-release}'
213       - string:
214           name: DIB_OS_ELEMENT
215           default: '{dib-os-element}'
216       - string:
217           name: DIB_OS_PACKAGES
218           default: '{dib-os-packages}'
219       - string:
220           name: EXTRA_DIB_ELEMENTS
221           default: '{extra-dib-elements}'
222       - string:
223           name: CLEAN_DIB_IMAGES
224           default: 'true'
225       - label:
226           name: SLAVE_LABEL
227           default: '{slave-label}'
228       - string:
229           name: CI_LOOP
230           default: 'daily'
231       - string:
232           name: INSTALLER_TYPE
233           default: 'osa'
234       - string:
235           name: FUNCTEST_MODE
236           default: 'daily'
237       - string:
238           name: FUNCTEST_SUITE_NAME
239           default: 'daily'
240           description: "Daily suite name to run"
241
242     builders:
243       - description-setter:
244           description: "Built on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
245       - 'xci-{phase}-builder'
246
247 # --------------------------
248 # builder macros
249 # --------------------------
250 - builder:
251     name: xci-deploy-builder
252     builders:
253       - shell:
254           !include-raw: ./xci-deploy.sh
255
256 - builder:
257     name: xci-functest-builder
258     builders:
259       - shell: |
260           #!/bin/bash
261
262           echo "Hello World!"
263
264 # this will be enabled once the xci is prepared
265 # - builder:
266 #    name: xci-functest-builder
267 #    builders:
268 #        - shell:
269 #            !include-raw:
270 #                - ../../utils/fetch_os_creds.sh
271 #                - ../functest/functest-alpine.sh