e945b39cc945c5f60af05d0181cbc536828c81e0
[infra/cicd.git] / jjb / cloud-infra / cloud-infra-periodic-engine.yaml
1 ---
2 #
3 # ============LICENSE_START=======================================================
4 #  Copyright (C) 2019 Nordix Foundation.
5 # ================================================================================
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
9 #
10 #      http://www.apache.org/licenses/LICENSE-2.0
11 #
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17 #
18 # SPDX-License-Identifier: Apache-2.0
19 # ============LICENSE_END=========================================================
20
21 #--------------------------------------------------------------------------------------
22 # The jobs declared in this JJB configuration file are used for verifying cloud-infra
23 # engine from the tip of the master branch periodically to check the stability of it.
24 #
25 # These jobs are set to run on slaves with label vpod-deploy-ubuntu1604.
26 # The slaves have
27 #   - Ubuntu1604 as the base distro
28 #   - nested virtualization
29 #   - internet access
30 #   - passwordless sudo
31 #   - 16 CPUs/32GB RAM/200 GB Disk
32 #   - docker, git vim curl wget zip unzip chrony apt-transport-https ca-certificates curl
33 #     gnupg-agent software-properties-common docker-ce docker-ce-cli containerd.io openjdk-8-jre
34 #
35 # The slaves should not have a cloud infra scenario deployed on them.
36 #--------------------------------------------------------------------------------------
37
38 - project:
39     name: 'cloud-infra-periodic-engine'
40
41     project: 'infra/engine'
42
43     stream:
44       - 'master':
45           branch: '{stream}'
46           disabled: 'false'
47
48     os:
49       - ubuntu1804:
50           disabled: 'false'
51           distribution: 'ubuntu18'
52           ipa_dib_os_element: 'coreos'
53           dib_os_release: 'bionic'
54           dib_os_element: 'ubuntu-minimal'
55       - centos7:
56           disabled: 'true'
57           distribution: 'centos7'
58           ipa_dib_os_element: 'coreos'
59           dib_os_release: '7'
60           dib_os_element: 'centos-minimal'
61
62     type:
63       - virtual
64
65     phase:
66       - deploy
67       - functest
68
69     jobs:
70       - 'cloud-infra-periodic-engine-{os}-{type}-{stream}'
71       - 'cloud-infra-periodic-{os}-{phase}-{type}-{stream}'
72
73 - job-template:
74     name: 'cloud-infra-periodic-engine-{os}-{type}-{stream}'
75
76     project-type: multijob
77
78     disabled: '{obj:disabled}'
79
80     concurrent: true
81
82     parameters:
83       - project-parameters:
84           project: '{project}'
85           branch: '{branch}'
86       - nordix-gerrit-parameters
87       - label:
88           name: SLAVE_LABEL
89           default: 'vpod-deploy-{os}'
90           description: 'Slave label to schedule this job on. All slaves have Ubuntu1604 no matter what distro target nodes use'
91       - string:
92           name: DISTRIBUTION
93           default: '{distribution}'
94           description: 'Distribution to use for configuring target nodes (networking etc.)'
95       - string:
96           name: USE_PREBUILT_DEPLOYMENT_IMAGE
97           default: 'true'
98           description: 'Use prebuilt deployment image while running as part of CI/CD'
99       - string:
100           name: IPA_DIB_OS_ELEMENT
101           default: '{ipa_dib_os_element}'
102           description: 'DIB OS Element to use for building the ramdisk image'
103       - string:
104           name: DIB_OS_RELEASE
105           default: '{dib_os_release}'
106           description: 'DIB OS Release to use for building the deployment image to provision target nodes with'
107       - string:
108           name: DIB_OS_ELEMENT
109           default: '{dib_os_element}'
110           description: 'DIB OS Element to use for building the deployment image to provision target nodes with'
111       - string:
112           name: DEPLOY_SCENARIO
113           default: 'k8-calico-nofeature'
114           description: 'Scenario to deploy and test'
115       - string:
116           name: TEST_SUITE
117           default: 'healthcheck'
118           description: 'Test suite to run'
119       - string:
120           name: CLEANUP
121           default: 'true'
122           description: 'Cleanup leftovers of the previous run'
123
124     properties:
125       - logrotate
126       - build-blocker:
127           use-build-blocker: true
128           blocking-jobs:
129             - 'cloud-infra-verify-engine-{os}-.*'
130             - 'cloud-infra-periodic-engine-{os}-.*'
131             - 'cloud-infra-os-.*'
132             - 'cloud-infra-k8-.*'
133           block-level: 'NODE'
134       - throttle:
135           max-per-node: 1
136           max-total: 3
137           option: project
138
139     wrappers:
140       - build-timeout:
141           timeout: 120
142       - fix-workspace-permissions
143       - openstack:
144           single-use: True
145
146     scm:
147       - git-scm:
148           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
149           branch: '{branch}'
150           refspec: ''
151
152     triggers:
153       - timed: 'H H/2 * * *'
154
155     builders:
156       - multijob:
157           name: deploy
158           condition: SUCCESSFUL
159           projects:
160             - name: 'cloud-infra-periodic-{os}-deploy-{type}-{stream}'
161               current-parameters: true
162               predefined-parameters: |
163                 DISTRIBUTION=$DISTRIBUTION
164                 USE_PREBUILT_DEPLOYMENT_IMAGE=$USE_PREBUILT_DEPLOYMENT_IMAGE
165                 IPA_DIB_OS_ELEMENT=$IPA_DIB_OS_ELEMENT
166                 DIB_OS_RELEASE=$DIB_OS_RELEASE
167                 DIB_OS_ELEMENT=$DIB_OS_ELEMENT
168                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
169                 CLEANUP=$CLEANUP
170               git-revision: true
171               node-parameters: true
172               kill-phase-on: FAILURE
173               abort-all-job: true
174       - multijob:
175           name: functest
176           condition: ALWAYS
177           projects:
178             - name: 'cloud-infra-periodic-{os}-functest-{type}-{stream}'
179               current-parameters: true
180               predefined-parameters: |
181                 DISTRIBUTION=$DISTRIBUTION
182                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
183                 TEST_SUITE=$TEST_SUITE
184                 CLEANUP=$CLEANUP
185               node-parameters: true
186               kill-phase-on: NEVER
187               abort-all-job: false
188       - multijob:
189           name: yardstick
190           condition: ALWAYS
191           projects:
192             - name: 'cloud-infra-periodic-{os}-yardstick-{type}-{stream}'
193               current-parameters: true
194               predefined-parameters: |
195                 DISTRIBUTION=$DISTRIBUTION
196                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
197                 TEST_SUITE=$TEST_SUITE
198                 CLEANUP=$CLEANUP
199               node-parameters: true
200               kill-phase-on: NEVER
201               abort-all-job: false
202
203 - job-template:
204     name: 'cloud-infra-periodic-{os}-{phase}-{type}-{stream}'
205
206     disabled: false
207
208     concurrent: true
209
210     properties:
211       - logrotate
212
213     parameters:
214       - string:
215           name: PROJECT
216           default: $GERRIT_PROJECT
217       - string:
218           name: DISTRIBUTION
219           default: 'ubuntu18'
220           description: 'Distribution to use for configuring target nodes (networking etc.). Overriden by upstream job.'
221       - string:
222           name: USE_PREBUILT_DEPLOYMENT_IMAGE
223           default: 'false'
224           description: 'Use prebuilt deployment image while running as part of CI/CD'
225       - string:
226           name: IPA_DIB_OS_ELEMENT
227           default: 'fedora'
228           description: 'DIB OS Element to use for building the ramdisk image. Overriden by upstream job.'
229       - string:
230           name: DIB_OS_RELEASE
231           default: 'bionic'
232           description: 'DIB OS Release to use for building the deployment image to provision target nodes with. Overriden by upstream job.'
233       - string:
234           name: DIB_OS_ELEMENT
235           default: 'ubuntu-minimal'
236           description: 'DIB OS Element to use for building the deployment image to provision target nodes with. Overriden by upstream job.'
237       - string:
238           name: ENGINE_ANSIBLE_PARAMS
239           default: ' -v '
240           description: 'Extra paramters that can be added when run the play books.'
241       - string:
242           name: DEPLOY_SCENARIO
243           default: 'k8-calico-nofeature'
244           description: 'Scenario to deploy and test'
245       - string:
246           name: TEST_FW
247           default: '{phase}'
248           description: 'Test framework to use'
249       - string:
250           name: TEST_SUITE
251           default: 'healthcheck'
252           description: 'Test suite to run'
253       - string:
254           name: TEST_REPO_URL
255           default: 'https://gerrit.nordix.org/infra/test.git'
256           description: 'URL to Nordix Cloud Infra test repository'
257       - string:
258           name: CLEANUP
259           default: 'false'
260
261     wrappers:
262       - build-timeout:
263           timeout: 120
264       - fix-workspace-permissions
265
266     scm:
267       - git-scm:
268           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
269           branch: '{branch}'
270           refspec: ''
271
272     builders:
273       - 'cloud-infra-{phase}-macro'
274
275 # vim: set ts=2 sw=2 expandtab: