2291089ae414cd27f46f3536242d68dc05ac766f
[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       - yardstick
69
70     jobs:
71       - 'cloud-infra-periodic-engine-{os}-{type}-{stream}'
72       - 'cloud-infra-periodic-{os}-{phase}-{type}-{stream}'
73
74 - job-template:
75     name: 'cloud-infra-periodic-engine-{os}-{type}-{stream}'
76
77     project-type: multijob
78
79     disabled: '{obj:disabled}'
80
81     concurrent: true
82
83     parameters:
84       - project-parameters:
85           project: '{project}'
86           branch: '{branch}'
87       - nordix-gerrit-parameters
88       - label:
89           name: SLAVE_LABEL
90           default: 'vpod-deploy-city'
91           description: 'Slave label to schedule this job on. All slaves have Ubuntu1604 no matter what distro target nodes use'
92       - string:
93           name: DISTRIBUTION
94           default: '{distribution}'
95           description: 'Distribution to use for configuring target nodes (networking etc.)'
96       - string:
97           name: USE_PREBUILT_DEPLOYMENT_IMAGE
98           default: 'true'
99           description: 'Use prebuilt deployment image while running as part of CI/CD'
100       - string:
101           name: IPA_DIB_OS_ELEMENT
102           default: '{ipa_dib_os_element}'
103           description: 'DIB OS Element to use for building the ramdisk image'
104       - string:
105           name: DIB_OS_RELEASE
106           default: '{dib_os_release}'
107           description: 'DIB OS Release to use for building the deployment image to provision target nodes with'
108       - string:
109           name: DIB_OS_ELEMENT
110           default: '{dib_os_element}'
111           description: 'DIB OS Element to use for building the deployment image to provision target nodes with'
112       - string:
113           name: DEPLOY_SCENARIO
114           default: 'k8-calico-nofeature'
115           description: 'Scenario to deploy and test'
116       - string:
117           name: TEST_SUITE
118           default: 'healthcheck'
119           description: 'Test suite to run'
120       - string:
121           name: CLEANUP
122           default: 'true'
123           description: 'Cleanup leftovers of the previous run'
124
125     properties:
126       - logrotate
127       - build-blocker:
128           use-build-blocker: true
129           blocking-jobs:
130             - 'cloud-infra-verify-engine-{os}-.*'
131             - 'cloud-infra-periodic-engine-{os}-.*'
132             - 'cloud-infra-os-.*'
133             - 'cloud-infra-k8-.*'
134           block-level: 'NODE'
135       - throttle:
136           max-per-node: 1
137           max-total: 3
138           option: project
139
140     wrappers:
141       - build-timeout:
142           timeout: 120
143       - fix-workspace-permissions
144
145     scm:
146       - git-scm:
147           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
148           branch: '{branch}'
149           refspec: ''
150
151     triggers:
152       - timed: 'H H/2 * * *'
153
154     builders:
155       - multijob:
156           name: deploy
157           condition: SUCCESSFUL
158           projects:
159             - name: 'cloud-infra-periodic-{os}-deploy-{type}-{stream}'
160               current-parameters: true
161               predefined-parameters: |
162                 DISTRIBUTION=$DISTRIBUTION
163                 USE_PREBUILT_DEPLOYMENT_IMAGE=$USE_PREBUILT_DEPLOYMENT_IMAGE
164                 IPA_DIB_OS_ELEMENT=$IPA_DIB_OS_ELEMENT
165                 DIB_OS_RELEASE=$DIB_OS_RELEASE
166                 DIB_OS_ELEMENT=$DIB_OS_ELEMENT
167                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
168                 CLEANUP=$CLEANUP
169               git-revision: true
170               node-parameters: true
171               kill-phase-on: FAILURE
172               abort-all-job: true
173       - multijob:
174           name: functest
175           condition: ALWAYS
176           projects:
177             - name: 'cloud-infra-periodic-{os}-functest-{type}-{stream}'
178               current-parameters: true
179               predefined-parameters: |
180                 DISTRIBUTION=$DISTRIBUTION
181                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
182                 TEST_SUITE=$TEST_SUITE
183                 CLEANUP=$CLEANUP
184               node-parameters: true
185               kill-phase-on: NEVER
186               abort-all-job: false
187       - multijob:
188           name: yardstick
189           condition: ALWAYS
190           projects:
191             - name: 'cloud-infra-periodic-{os}-yardstick-{type}-{stream}'
192               current-parameters: true
193               predefined-parameters: |
194                 DISTRIBUTION=$DISTRIBUTION
195                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
196                 TEST_SUITE=$TEST_SUITE
197                 CLEANUP=$CLEANUP
198               node-parameters: true
199               kill-phase-on: NEVER
200               abort-all-job: false
201
202 - job-template:
203     name: 'cloud-infra-periodic-{os}-{phase}-{type}-{stream}'
204
205     disabled: false
206
207     concurrent: true
208
209     properties:
210       - logrotate
211
212     parameters:
213       - string:
214           name: PROJECT
215           default: $GERRIT_PROJECT
216       - string:
217           name: DISTRIBUTION
218           default: 'ubuntu18'
219           description: 'Distribution to use for configuring target nodes (networking etc.). Overriden by upstream job.'
220       - string:
221           name: USE_PREBUILT_DEPLOYMENT_IMAGE
222           default: 'false'
223           description: 'Use prebuilt deployment image while running as part of CI/CD'
224       - string:
225           name: IPA_DIB_OS_ELEMENT
226           default: 'fedora'
227           description: 'DIB OS Element to use for building the ramdisk image. Overriden by upstream job.'
228       - string:
229           name: DIB_OS_RELEASE
230           default: 'bionic'
231           description: 'DIB OS Release to use for building the deployment image to provision target nodes with. Overriden by upstream job.'
232       - string:
233           name: DIB_OS_ELEMENT
234           default: 'ubuntu-minimal'
235           description: 'DIB OS Element to use for building the deployment image to provision target nodes with. Overriden by upstream job.'
236       - string:
237           name: ENGINE_ANSIBLE_PARAMS
238           default: ' -v '
239           description: 'Extra paramters that can be added when run the play books.'
240       - string:
241           name: DEPLOY_SCENARIO
242           default: 'k8-calico-nofeature'
243           description: 'Scenario to deploy and test'
244       - string:
245           name: TEST_FW
246           default: '{phase}'
247           description: 'Test framework to use'
248       - string:
249           name: TEST_SUITE
250           default: 'healthcheck'
251           description: 'Test suite to run'
252       - string:
253           name: TEST_REPO_URL
254           default: 'https://gerrit.nordix.org/infra/test.git'
255           description: 'URL to Nordix Cloud Infra test repository'
256       - string:
257           name: CLEANUP
258           default: 'false'
259
260     wrappers:
261       - build-timeout:
262           timeout: 120
263       - fix-workspace-permissions
264
265     scm:
266       - git-scm:
267           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
268           branch: '{branch}'
269           refspec: ''
270
271     builders:
272       - 'cloud-infra-{phase}-macro'
273
274 # vim: set ts=2 sw=2 expandtab: