a92e49085a7f2d76ca54c5be32545ca0ba4365e3
[releng.git] / jjb / xci / xci-daily-jobs.yml
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
158 - job-template:
159     name: 'xci-{phase}-{pod}-{distro}-daily-{stream}'
160
161     disabled: '{obj:disabled}'
162
163     concurrent: false
164
165     properties:
166       - build-blocker:
167           use-build-blocker: true
168           blocking-jobs:
169             - '^xci-deploy.*'
170             - '^xci-functest.*'
171             - '^bifrost-.*periodic.*'
172             - '^osa-.*periodic.*'
173           block-level: 'NODE'
174       - logrotate-default
175
176     wrappers:
177       - fix-workspace-permissions
178
179     scm:
180       - git-scm
181
182     parameters:
183       - project-parameter:
184           project: '{project}'
185           branch: '{opnfv-releng-version}'
186       - string:
187           name: GIT_BASE
188           default: https://gerrit.opnfv.org/gerrit/$PROJECT
189       - string:
190           name: DEPLOY_SCENARIO
191           default: 'os-nosdn-nofeature-ha'
192       - string:
193           name: XCI_FLAVOR
194           default: 'ha'
195       - string:
196           name: DISTRO
197           default: '{distro}'
198       - string:
199           name: DIB_OS_RELEASE
200           default: '{dib-os-release}'
201       - string:
202           name: DIB_OS_ELEMENT
203           default: '{dib-os-element}'
204       - string:
205           name: DIB_OS_PACKAGES
206           default: '{dib-os-packages}'
207       - string:
208           name: EXTRA_DIB_ELEMENTS
209           default: '{extra-dib-elements}'
210       - string:
211           name: CLEAN_DIB_IMAGES
212           default: 'true'
213       - label:
214           name: SLAVE_LABEL
215           default: '{slave-label}'
216       - string:
217           name: CI_LOOP
218           default: 'daily'
219       - string:
220           name: INSTALLER_TYPE
221           default: 'osa'
222       - string:
223           name: FUNCTEST_MODE
224           default: 'daily'
225       - string:
226           name: FUNCTEST_SUITE_NAME
227           default: 'daily'
228           description: "Daily suite name to run"
229
230     builders:
231       - description-setter:
232           description: "Built on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
233       - 'xci-{phase}-builder'
234
235 # --------------------------
236 # builder macros
237 # --------------------------
238 - builder:
239     name: xci-deploy-builder
240     builders:
241       - shell:
242           !include-raw: ./xci-deploy.sh
243
244 - builder:
245     name: xci-functest-builder
246     builders:
247       - shell: |
248           #!/bin/bash
249
250           echo "Hello World!"
251
252 # this will be enabled once the xci is prepared
253 # - builder:
254 #    name: xci-functest-builder
255 #    builders:
256 #        - shell:
257 #            !include-raw:
258 #                - ../../utils/fetch_os_creds.sh
259 #                - ../functest/functest-alpine.sh