xci: Adjust and fix jobs and scripts
[releng.git] / jjb / xci / xci-daily-jobs.yml
1 #--------------------------------
2 # These jobs run on a daily basis and deploy OpenStack
3 # using the pinned versions of opnfv/releng, openstack/bifrost
4 # and openstack/openstack-ansible. Due to this, there is no
5 # version/branch is set/passed to jobs and instead the versions
6 # are checked out based on what is configured.
7 #--------------------------------
8 - project:
9     project: 'releng'
10
11     name: 'xci-daily'
12 #--------------------------------
13 # Branch Anchors
14 #--------------------------------
15     master: &master
16         stream: master
17         opnfv-releng-version: master
18         gs-pathname: ''
19     ocata: &ocata
20         stream: ocata
21         opnfv-releng-version: master
22         gs-pathname: '/{stream}'
23 #--------------------------------
24 # Scenarios
25 #--------------------------------
26     scenario:
27         - 'os-nosdn-nofeature-ha':
28             auto-trigger-name: 'daily-trigger-disabled'
29             xci-flavor: 'ha'
30         - 'os-nosdn-nofeature-noha':
31             auto-trigger-name: 'daily-trigger-disabled'
32             xci-flavor: 'noha'
33 #--------------------------------
34 # XCI PODs
35 #--------------------------------
36     pod:
37         - virtual:
38             <<: *master
39         - virtual:
40             <<: *ocata
41 #--------------------------------
42 # Supported Distros
43 #--------------------------------
44     distro:
45         - 'xenial':
46             disabled: false
47             slave-label: xci-xenial-virtual
48             dib-os-release: 'xenial'
49             dib-os-element: 'ubuntu-minimal'
50             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'
51             extra-dib-elements: 'openssh-server'
52         - 'centos7':
53             disabled: true
54             slave-label: xci-centos7-virtual
55             dib-os-release: '7'
56             dib-os-element: 'centos7'
57             dib-os-packages: 'vim,less,bridge-utils,iputils,rsyslog,curl'
58             extra-dib-elements: 'openssh-server'
59         - 'suse':
60             disabled: true
61             slave-label: xci-suse-virtual
62             dib-os-release: '42.2'
63             dib-os-element: 'opensuse-minimal'
64             dib-os-packages: 'vim,less,bridge-utils,iputils,rsyslog,curl'
65             extra-dib-elements: 'openssh-server'
66
67 #--------------------------------
68 #        Phases
69 #--------------------------------
70     phase:
71         - 'deploy'
72         - 'functest'
73 #--------------------------------
74 # jobs
75 #--------------------------------
76     jobs:
77         - 'xci-{scenario}-{pod}-{distro}-daily-{stream}'
78         - 'xci-{phase}-{pod}-{distro}-daily-{stream}'
79
80 #--------------------------------
81 # job templates
82 #--------------------------------
83 - job-template:
84     name: 'xci-{scenario}-{pod}-{distro}-daily-{stream}'
85
86     disabled: '{obj:disabled}'
87
88     concurrent: false
89
90     properties:
91         - build-blocker:
92             use-build-blocker: true
93             blocking-jobs:
94                 - '^xci-os.*'
95                 - '^xci-deploy.*'
96                 - '^xci-functest.*'
97                 - '^bifrost-.*periodic.*'
98                 - '^osa-.*periodic.*'
99             block-level: 'NODE'
100         - logrotate-default
101
102     parameters:
103         - string:
104             name: DEPLOY_SCENARIO
105             default: '{scenario}'
106         - string:
107             name: XCI_FLAVOR
108             default: '{xci-flavor}'
109         - label:
110             name: SLAVE_LABEL
111             default: '{slave-label}'
112
113     triggers:
114         - '{auto-trigger-name}'
115
116     wrappers:
117         - fix-workspace-permissions
118
119     builders:
120         - description-setter:
121             description: "Built on $NODE_NAME"
122         - trigger-builds:
123             - project: 'xci-deploy-{pod}-{distro}-daily-{stream}'
124               current-parameters: false
125               predefined-parameters: |
126                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
127                 XCI_FLAVOR=$XCI_FLAVOR
128               same-node: true
129               block: true
130         - trigger-builds:
131             - project: 'xci-functest-{pod}-{distro}-daily-{stream}'
132               current-parameters: false
133               predefined-parameters: |
134                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
135                 XCI_FLAVOR=$XCI_FLAVOR
136               same-node: true
137               block: true
138               block-thresholds:
139                 build-step-failure-threshold: 'never'
140                 failure-threshold: 'never'
141                 unstable-threshold: 'FAILURE'
142
143     publishers:
144         - email:
145             recipients: fatih.degirmenci@ericsson.com yroblamo@redhat.com mchandras@suse.de jack.morgan@intel.com julienjut@gmail.com
146
147 - job-template:
148     name: 'xci-{phase}-{pod}-{distro}-daily-{stream}'
149
150     disabled: '{obj:disabled}'
151
152     concurrent: false
153
154     properties:
155         - build-blocker:
156             use-build-blocker: true
157             blocking-jobs:
158                 - '^xci-os.*'
159                 - '^xci-deploy.*'
160                 - '^xci-functest.*'
161                 - '^bifrost-.*periodic.*'
162                 - '^osa-.*periodic.*'
163             block-level: 'NODE'
164         - logrotate-default
165
166     wrappers:
167         - fix-workspace-permissions
168
169     scm:
170         - git-scm
171
172     parameters:
173         - project-parameter:
174             project: '{project}'
175             branch: '{opnfv-releng-version}'
176         - string:
177             name: GIT_BASE
178             default: https://gerrit.opnfv.org/gerrit/$PROJECT
179         - string:
180             name: DEPLOY_SCENARIO
181             default: 'os-nosdn-nofeature-ha'
182         - string:
183             name: XCI_FLAVOR
184             default: 'ha'
185         - string:
186             name: DISTRO
187             default: '{distro}'
188         - string:
189             name: DIB_OS_RELEASE
190             default: '{dib-os-release}'
191         - string:
192             name: DIB_OS_ELEMENT
193             default: '{dib-os-element}'
194         - string:
195             name: DIB_OS_PACKAGES
196             default: '{dib-os-packages}'
197         - string:
198             name: EXTRA_DIB_ELEMENTS
199             default: '{extra-dib-elements}'
200         - string:
201             name: CLEAN_DIB_IMAGES
202             default: 'true'
203         - label:
204             name: SLAVE_LABEL
205             default: '{slave-label}'
206         - string:
207             name: ANSIBLE_VERBOSITY
208             default: ''
209
210     builders:
211         - description-setter:
212             description: "Built on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
213         - 'xci-{phase}-builder'
214
215 #---------------------------
216 # builder macros
217 #---------------------------
218 - builder:
219     name: xci-deploy-builder
220     builders:
221         - shell:
222             !include-raw: ./xci-deploy.sh
223
224 - builder:
225     name: xci-functest-builder
226     builders:
227         - shell:
228             !include-raw: ./xci-functest.sh