xci: Introduce XCI_LOOP variable to control what to do properly
[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         - string:
113             name: XCI_LOOP
114             default: 'daily'
115
116     triggers:
117         - '{auto-trigger-name}'
118
119     wrappers:
120         - fix-workspace-permissions
121
122     builders:
123         - description-setter:
124             description: "Built on $NODE_NAME"
125         - trigger-builds:
126             - project: 'xci-deploy-{pod}-{distro}-daily-{stream}'
127               current-parameters: false
128               predefined-parameters: |
129                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
130                 XCI_FLAVOR=$XCI_FLAVOR
131                 XCI_LOOP=$XCI_LOOP
132               same-node: true
133               block: true
134         - trigger-builds:
135             - project: 'xci-functest-{pod}-{distro}-daily-{stream}'
136               current-parameters: false
137               predefined-parameters: |
138                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
139                 XCI_FLAVOR=$XCI_FLAVOR
140                 XCI_LOOP=$XCI_LOOP
141               same-node: true
142               block: true
143               block-thresholds:
144                 build-step-failure-threshold: 'never'
145                 failure-threshold: 'never'
146                 unstable-threshold: 'FAILURE'
147
148     publishers:
149         - email:
150             recipients: fatih.degirmenci@ericsson.com yroblamo@redhat.com mchandras@suse.de jack.morgan@intel.com julienjut@gmail.com
151
152 - job-template:
153     name: 'xci-{phase}-{pod}-{distro}-daily-{stream}'
154
155     disabled: '{obj:disabled}'
156
157     concurrent: false
158
159     properties:
160         - build-blocker:
161             use-build-blocker: true
162             blocking-jobs:
163                 - '^xci-deploy.*'
164                 - '^xci-functest.*'
165                 - '^bifrost-.*periodic.*'
166                 - '^osa-.*periodic.*'
167             block-level: 'NODE'
168         - logrotate-default
169
170     wrappers:
171         - fix-workspace-permissions
172
173     scm:
174         - git-scm
175
176     parameters:
177         - project-parameter:
178             project: '{project}'
179             branch: '{opnfv-releng-version}'
180         - string:
181             name: GIT_BASE
182             default: https://gerrit.opnfv.org/gerrit/$PROJECT
183         - string:
184             name: DEPLOY_SCENARIO
185             default: 'os-nosdn-nofeature-ha'
186         - string:
187             name: XCI_FLAVOR
188             default: 'ha'
189         - string:
190             name: DISTRO
191             default: '{distro}'
192         - string:
193             name: DIB_OS_RELEASE
194             default: '{dib-os-release}'
195         - string:
196             name: DIB_OS_ELEMENT
197             default: '{dib-os-element}'
198         - string:
199             name: DIB_OS_PACKAGES
200             default: '{dib-os-packages}'
201         - string:
202             name: EXTRA_DIB_ELEMENTS
203             default: '{extra-dib-elements}'
204         - string:
205             name: CLEAN_DIB_IMAGES
206             default: 'true'
207         - label:
208             name: SLAVE_LABEL
209             default: '{slave-label}'
210         - string:
211             name: ANSIBLE_VERBOSITY
212             default: ''
213         - string:
214             name: XCI_LOOP
215             default: 'daily'
216
217     builders:
218         - description-setter:
219             description: "Built on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
220         - 'xci-{phase}-builder'
221
222 #---------------------------
223 # builder macros
224 #---------------------------
225 - builder:
226     name: xci-deploy-builder
227     builders:
228         - shell:
229             !include-raw: ./xci-deploy.sh
230
231 - builder:
232     name: xci-functest-builder
233     builders:
234         - shell:
235             !include-raw: ./xci-functest.sh