Merge "make unittest execution more user-friendly"
[releng.git] / jjb / xci / xci-daily-jobs.yml
1 - project:
2     name: 'bifrost-osa-daily'
3 #--------------------------------
4 # BRANCH ANCHORS
5 #--------------------------------
6 # the versions stated here default to branches which then later
7 # on used for checking out the branches, pulling in head of the branch.
8 # but they also allow us to state sha1 so instead of checking out the
9 # branches, we can check out sha1 if we want to use locked/specific
10 # sha1 or manually enter sha1.
11     master: &master
12         stream: master
13         openstack-osa-version: '{stream}'
14         openstack-bifrost-version: '{stream}'
15         opnfv-releng-version: 'master'
16         gs-pathname: ''
17     ocata: &ocata
18         stream: ocata
19         openstack-osa-version: 'stable/{stream}'
20         openstack-bifrost-version: 'stable/{stream}'
21         opnfv-releng-version: 'master'
22         gs-pathname: '/{stream}'
23 #--------------------------------
24 #       scenarios
25 #--------------------------------
26     scenario:
27         # HA scenarios
28         - 'os-nosdn-nofeature-ha':
29             auto-trigger-name: 'daily-trigger-disabled'
30 #--------------------------------
31 #        XCI PODs
32 #--------------------------------
33     pod:
34         - virtual:
35             <<: *master
36         - virtual:
37             <<: *ocata
38 #--------------------------------
39 #        Supported Distros
40 #--------------------------------
41     distro:
42         - 'xenial':
43             disabled: false
44             slave-label: xci-xenial-virtual
45             dib-os-release: 'xenial'
46             dib-os-element: 'ubuntu-minimal'
47             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'
48             extra-dib-elements: 'openssh-server'
49         - 'centos7':
50             disabled: true
51             slave-label: xci-centos7-virtual
52             dib-os-release: '7'
53             dib-os-element: 'centos7'
54             dib-os-packages: 'vim,less,bridge-utils,iputils,rsyslog,curl'
55             extra-dib-elements: 'openssh-server'
56         - 'suse':
57             disabled: true
58             slave-label: xci-suse-virtual
59             dib-os-release: '42.2'
60             dib-os-element: 'opensuse-minimal'
61             dib-os-packages: 'vim,less,bridge-utils,iputils,rsyslog,curl'
62             extra-dib-elements: 'openssh-server'
63 #--------------------------------
64 #        Phases
65 #--------------------------------
66     phase:
67         - 'provision'
68         - 'deploy'
69         - 'functest'
70 #--------------------------------
71 # jobs
72 #--------------------------------
73     jobs:
74         - 'xci-{scenario}-{pod}-{distro}-daily-{stream}'
75         - 'xci-{phase}-{pod}-{distro}-daily-{stream}'
76
77 #--------------------------------
78 # job templates
79 #--------------------------------
80 - job-template:
81     name: 'xci-{scenario}-{pod}-{distro}-daily-{stream}'
82
83     disabled: '{obj:disabled}'
84
85     concurrent: false
86
87     properties:
88         - build-blocker:
89             use-build-blocker: true
90             blocking-jobs:
91                 - '^xci-os.*'
92             block-level: 'NODE'
93         - logrotate-default
94
95     parameters:
96         - string:
97             name: OPENSTACK_OSA_VERSION
98             default: '{openstack-osa-version}'
99         - string:
100             name: OPENSTACK_BIFROST_VERSION
101             default: '{openstack-osa-version}'
102         - string:
103             name: OPNFV_RELENG_VERSION
104             default: '{opnfv-releng-version}'
105         - string:
106             name: USE_PROMOTED_VERSIONS
107             default: 'true'
108         - string:
109             name: DEPLOY_SCENARIO
110             default: '{scenario}'
111         - label:
112             name: SLAVE_LABEL
113             default: '{slave-label}'
114
115     triggers:
116         - '{auto-trigger-name}'
117
118     wrappers:
119         - xci-fix-perms-workspace
120
121     builders:
122         - description-setter:
123             description: "Built on $NODE_NAME"
124         - trigger-builds:
125             - project: 'xci-provision-{pod}-{distro}-daily-{stream}'
126               current-parameters: false
127               predefined-parameters:
128                 DEPLOY_SCENARIO={scenario}
129               same-node: true
130               block: true
131         - trigger-builds:
132             - project: 'xci-deploy-{pod}-{distro}-daily-{stream}'
133               current-parameters: false
134               predefined-parameters:
135                 DEPLOY_SCENARIO={scenario}
136               same-node: true
137               block: true
138         - trigger-builds:
139             - project: 'xci-functest-{pod}-{distro}-daily-{stream}'
140               current-parameters: false
141               predefined-parameters:
142                 DEPLOY_SCENARIO={scenario}
143               same-node: true
144               block: true
145               block-thresholds:
146                 build-step-failure-threshold: 'never'
147                 failure-threshold: 'never'
148                 unstable-threshold: 'FAILURE'
149
150     publishers:
151         - email:
152             recipients: fatih.degirmenci@ericsson.com yroblamo@redhat.com mchandras@suse.de jack.morgan@intel.com julienjut@gmail.com
153
154 - job-template:
155     name: 'xci-{phase}-{pod}-{distro}-daily-{stream}'
156
157     disabled: '{obj:disabled}'
158
159     concurrent: false
160
161     properties:
162         - build-blocker:
163             use-build-blocker: true
164             blocking-jobs:
165                 - '^xci-provision.*'
166                 - '^xci-deploy.*'
167                 - '^xci-functest.*'
168             block-level: 'NODE'
169         - logrotate-default
170
171     parameters:
172         - string:
173             name: OPENSTACK_OSA_VERSION
174             default: '{openstack-osa-version}'
175         - string:
176             name: OPENSTACK_BIFROST_VERSION
177             default: '{openstack-osa-version}'
178         - string:
179             name: OPNFV_RELENG_VERSION
180             default: '{opnfv-releng-version}'
181         - string:
182             name: USE_PROMOTED_VERSIONS
183             default: 'true'
184         - string:
185             name: DEPLOY_SCENARIO
186             default: 'os-nosdn-nofeature-ha'
187         - string:
188             name: DISTRO
189             default: '{distro}'
190         - string:
191             name: DIB_OS_RELEASE
192             default: '{dib-os-release}'
193         - string:
194             name: DIB_OS_ELEMENT
195             default: '{dib-os-element}'
196         - string:
197             name: EXTRA_DIB_ELEMENTS
198             default: '{extra-dib-elements}'
199         - string:
200             name: DIB_OS_PACKAGES
201             default: '{dib-os-packages}'
202         - string:
203             name: CLEAN_DIB_IMAGES
204             default: 'true'
205         - label:
206             name: SLAVE_LABEL
207             default: '{slave-label}'
208
209     wrappers:
210         - xci-fix-perms-workspace
211
212     builders:
213         - description-setter:
214             description: "Built on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
215         - 'xci-{phase}-builder'
216
217 #---------------------------
218 # wrapper macros
219 #---------------------------
220 - wrapper:
221     name: xci-fix-perms-workspace
222     wrappers:
223         - pre-scm-buildstep:
224           - shell: |
225                 #!/bin/bash
226                 sudo chown -R $USER $WORKSPACE || exit 1
227
228 #---------------------------
229 # builder macros
230 #---------------------------
231 - builder:
232     name: xci-provision-builder
233     builders:
234         - shell:
235             !include-raw: ./xci-provision.sh
236 - builder:
237     name: xci-deploy-builder
238     builders:
239         - shell:
240             !include-raw: ./xci-deploy.sh
241 - builder:
242     name: xci-functest-builder
243     builders:
244         - shell:
245             !include-raw: ./xci-functest.sh