Move verify and periodic jobs to City Cloud instances
[infra/cicd.git] / jjb / cloud-infra / cloud-infra-verify-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 patches
23 # that are sent to the repositories below
24 #   - cloud-infra/engine
25 #
26 # These jobs verify changes that
27 #   - implement new features or fix bugs for the deployment framework, engine, itself
28 #   - implement new features or fix bugs to the playbooks and roles used for utilizing
29 #     open source components such as bifrost, kubespray, and kolla-ansible
30 #   - bump versions of open source components or the scenarios
31 #
32 # These jobs are set to run on slaves with label vpod-deploy-ubuntu1604.
33 # The slaves have
34 #   - Ubuntu1604 as the base distro
35 #   - nested virtualization
36 #   - internet access
37 #   - passwordless sudo
38 #   - 16 CPUs/32GB RAM/200 GB Disk
39 #   - docker, git vim curl wget zip unzip chrony apt-transport-https ca-certificates curl
40 #     gnupg-agent software-properties-common docker-ce docker-ce-cli containerd.io openjdk-8-jre
41 #
42 # The slaves should not have a cloud infra scenario deployed on them.
43 #--------------------------------------------------------------------------------------
44
45 - project:
46     name: 'cloud-infra-verify-engine'
47
48     project: 'infra/engine'
49
50     stream:
51       - 'master':
52           branch: '{stream}'
53           disabled: 'false'
54
55     os:
56       - ubuntu1804:
57           disabled: 'false'
58           distribution: 'ubuntu18'
59           ipa_dib_os_element: 'coreos'
60           dib_os_release: 'bionic'
61           dib_os_element: 'ubuntu-minimal'
62       - centos7:
63           disabled: 'true'
64           distribution: 'centos7'
65           ipa_dib_os_element: 'coreos'
66           dib_os_release: '7'
67           dib_os_element: 'centos-minimal'
68
69     type:
70       - virtual
71
72     phase:
73       - deploy
74       - functest
75
76     jobs:
77       - 'cloud-infra-verify-engine-{os}-{type}-{stream}'
78       - 'cloud-infra-verify-{os}-{phase}-{type}-{stream}'
79
80 - job-template:
81     name: 'cloud-infra-verify-engine-{os}-{type}-{stream}'
82
83     project-type: multijob
84
85     disabled: '{obj:disabled}'
86
87     concurrent: true
88
89     parameters:
90       - project-parameters:
91           project: '{project}'
92           branch: '{branch}'
93       - nordix-gerrit-parameters
94       - label:
95           name: SLAVE_LABEL
96           default: 'vpod-deploy-city'
97           description: 'Slave label to schedule this job on. All slaves have Ubuntu1604 no matter what distro target nodes use'
98       - string:
99           name: DISTRIBUTION
100           default: '{distribution}'
101           description: 'Distribution to use for configuring target nodes (networking etc.)'
102       - string:
103           name: USE_PREBUILT_DEPLOYMENT_IMAGE
104           default: 'true'
105           description: 'Use prebuilt deployment image while running as part of CI/CD'
106       - string:
107           name: IPA_DIB_OS_ELEMENT
108           default: '{ipa_dib_os_element}'
109           description: 'DIB OS Element to use for building the ramdisk image'
110       - string:
111           name: DIB_OS_RELEASE
112           default: '{dib_os_release}'
113           description: 'DIB OS Release to use for building the deployment image to provision target nodes with'
114       - string:
115           name: DIB_OS_ELEMENT
116           default: '{dib_os_element}'
117           description: 'DIB OS Element to use for building the deployment image to provision target nodes with'
118       - string:
119           name: DEPLOY_SCENARIO
120           default: 'k8-calico-nofeature'
121           description: 'Scenario to deploy and test'
122       - string:
123           name: TEST_SUITE
124           default: 'healthcheck'
125           description: 'Test suite to run'
126       - string:
127           name: CLEANUP
128           default: 'true'
129           description: 'Cleanup leftovers of the previous run'
130
131     properties:
132       - logrotate
133       - build-blocker:
134           use-build-blocker: true
135           blocking-jobs:
136             - 'cloud-infra-verify-engine-{os}-.*'
137             - 'cloud-infra-periodic-engine-{os}-.*'
138             - 'cloud-infra-os-.*'
139             - 'cloud-infra-k8-.*'
140           block-level: 'NODE'
141       - throttle:
142           max-per-node: 1
143           max-total: 3
144           option: project
145
146     wrappers:
147       - build-timeout:
148           timeout: 120
149       - fix-workspace-permissions
150
151     scm:
152       - git-scm-gerrit:
153           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
154           branch: '{branch}'
155           refspec: $GERRIT_REFSPEC
156
157     triggers:
158       - nordix-gerrit-trigger-patchset-created:
159           project: 'infra\/engine'
160           branch: '{branch}'
161           files: '**'
162
163     builders:
164       - multijob:
165           name: deploy
166           condition: SUCCESSFUL
167           projects:
168             - name: 'cloud-infra-verify-{os}-deploy-{type}-{stream}'
169               current-parameters: true
170               predefined-parameters: |
171                 DISTRIBUTION=$DISTRIBUTION
172                 USE_PREBUILT_DEPLOYMENT_IMAGE=$USE_PREBUILT_DEPLOYMENT_IMAGE
173                 IPA_DIB_OS_ELEMENT=$IPA_DIB_OS_ELEMENT
174                 DIB_OS_RELEASE=$DIB_OS_RELEASE
175                 DIB_OS_ELEMENT=$DIB_OS_ELEMENT
176                 CLEANUP=$CLEANUP
177                 GERRIT_PROJECT=$GERRIT_PROJECT
178                 GERRIT_BRANCH=$GERRIT_BRANCH
179                 GERRIT_REFSPEC=$GERRIT_REFSPEC
180                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
181                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
182               node-parameters: true
183               kill-phase-on: FAILURE
184               abort-all-job: true
185       - multijob:
186           name: functest
187           condition: SUCCESSFUL
188           projects:
189             - name: 'cloud-infra-verify-{os}-functest-{type}-{stream}'
190               current-parameters: true
191               predefined-parameters: |
192                 DISTRIBUTION=$DISTRIBUTION
193                 USE_PREBUILT_DEPLOYMENT_IMAGE=$USE_PREBUILT_DEPLOYMENT_IMAGE
194                 IPA_DIB_OS_ELEMENT=$IPA_DIB_OS_ELEMENT
195                 DIB_OS_RELEASE=$DIB_OS_RELEASE
196                 DIB_OS_ELEMENT=$DIB_OS_ELEMENT
197                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
198                 TEST_SUITE=$TEST_SUITE
199                 CLEANUP=$CLEANUP
200                 GERRIT_PROJECT=$GERRIT_PROJECT
201                 GERRIT_BRANCH=$GERRIT_BRANCH
202                 GERRIT_REFSPEC=$GERRIT_REFSPEC
203                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
204                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
205               node-parameters: true
206               kill-phase-on: FAILURE
207               abort-all-job: true
208
209 - job-template:
210     name: 'cloud-infra-verify-{os}-{phase}-{type}-{stream}'
211
212     disabled: false
213
214     concurrent: true
215
216     properties:
217       - logrotate
218
219     parameters:
220       - string:
221           name: PROJECT
222           default: $GERRIT_PROJECT
223       - string:
224           name: DISTRIBUTION
225           default: 'ubuntu18'
226           description: 'Distribution to use for configuring target nodes (networking etc.). Overriden by upstream job.'
227       - string:
228           name: USE_PREBUILT_DEPLOYMENT_IMAGE
229           default: 'false'
230           description: 'Use prebuilt deployment image while running as part of CI/CD'
231       - string:
232           name: IPA_DIB_OS_ELEMENT
233           default: 'fedora'
234           description: 'DIB OS Element to use for building the ramdisk image. Overriden by upstream job.'
235       - string:
236           name: DIB_OS_RELEASE
237           default: 'bionic'
238           description: 'DIB OS Release to use for building the deployment image to provision target nodes with. Overriden by upstream job.'
239       - string:
240           name: DIB_OS_ELEMENT
241           default: 'ubuntu-minimal'
242           description: 'DIB OS Element to use for building the deployment image to provision target nodes with. Overriden by upstream job.'
243       - string:
244           name: DEPLOY_SCENARIO
245           default: 'k8-calico-nofeature'
246           description: 'Scenario to deploy and test'
247       - string:
248           name: TEST_FW
249           default: '{phase}'
250           description: 'Test framework to use'
251       - string:
252           name: TEST_SUITE
253           default: 'healthcheck'
254           description: 'Test suite to run'
255       - string:
256           name: TEST_REPO_URL
257           default: 'https://gerrit.nordix.org/infra/test.git'
258           description: 'URL to Nordix Cloud Infra test repository'
259       - string:
260           name: CLEANUP
261           default: 'false'
262
263     wrappers:
264       - build-timeout:
265           timeout: 120
266       - fix-workspace-permissions
267
268     scm:
269       - git-scm-gerrit:
270           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
271           branch: '{branch}'
272           refspec: $GERRIT_REFSPEC
273
274     builders:
275       - 'cloud-infra-{phase}-macro'
276
277 # vim: set ts=2 sw=2 expandtab: