blob: a0db3fd3f4bee24ceacb186ee1cc046a0587526d [file] [log] [blame]
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +01001---
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
Fatih Degirmencid7f06a82019-03-23 12:54:45 +010021#--------------------------------------------------------------------------------------
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
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +010045- project:
Fatih Degirmencid7f06a82019-03-23 12:54:45 +010046 name: 'cloud-infra-verify-engine'
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +010047
Fatih Degirmenci1cea3ec2019-02-08 12:10:48 +010048 project: 'infra/engine'
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +010049
50 stream:
51 - 'master':
52 branch: '{stream}'
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +010053
Fatih Degirmencicde0f9d2019-05-09 12:50:05 +020054 distro:
Fatih Degirmencia71174c2019-02-28 10:19:43 +010055 - ubuntu1804:
Fatih Degirmencicde0f9d2019-05-09 12:50:05 +020056 disabled: false
Fatih Degirmencia71174c2019-02-28 10:19:43 +010057 - centos7:
Fatih Degirmencif6d92e92019-06-25 11:14:22 +020058 disabled: true
Fatih Degirmenci78358312019-10-17 11:20:59 +020059 cloud:
60 - city:
Fatih Degirmencifabd40b2019-12-17 14:38:11 +010061 openrc-credentials-file: 'est-jenkins-openrcfile-city-karlskrona-onap'
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +010062
63 type:
Fatih Degirmenci78358312019-10-17 11:20:59 +020064 - virtual:
65 provisioner-type: 'bifrost'
Fatih Degirmenci8f980952019-10-17 14:56:04 +020066 slave-type: 'vpod'
Fatih Degirmenci21b1a832019-12-17 10:24:57 +010067 successful: false
68 failed: false
69 unstable: false
70 notbuilt: false
Fatih Degirmenci78358312019-10-17 11:20:59 +020071 - cloud:
72 provisioner-type: 'heat'
Fatih Degirmenci8f980952019-10-17 14:56:04 +020073 slave-type: 'jumphost'
Fatih Degirmenci103cc0c2020-01-10 17:29:07 +000074 successful: false
75 failed: false
76 unstable: false
77 notbuilt: false
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +010078
79 phase:
Fatih Degirmencie820eb12019-07-27 20:18:14 +020080 - deploy:
81 build-timeout: 90
82 - functest:
Sriram Yagnaraman55d5b812019-10-22 11:55:25 +020083 build-timeout: 60
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +010084
85 jobs:
Fatih Degirmenci78358312019-10-17 11:20:59 +020086 - 'cloud-infra-verify-engine-{distro}-{cloud}-{type}-{stream}'
Fatih Degirmencicde0f9d2019-05-09 12:50:05 +020087 - 'cloud-infra-verify-engine-{distro}-{phase}-{type}-{stream}'
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +010088
89- job-template:
Fatih Degirmenci78358312019-10-17 11:20:59 +020090 name: 'cloud-infra-verify-engine-{distro}-{cloud}-{type}-{stream}'
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +010091
92 project-type: multijob
93
94 disabled: '{obj:disabled}'
95
96 concurrent: true
97
98 parameters:
99 - project-parameters:
100 project: '{project}'
101 branch: '{branch}'
102 - nordix-gerrit-parameters
Fatih Degirmencic83c5272019-02-26 14:52:07 +0100103 - label:
104 name: SLAVE_LABEL
Fatih Degirmenci8f980952019-10-17 14:56:04 +0200105 default: '{cloud}-{slave-type}-{distro}'
Fatih Degirmenci9ff8c252019-03-01 15:45:57 +0100106 description: 'Slave label to schedule this job on. All slaves have Ubuntu1604 no matter what distro target nodes use'
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100107 - string:
Fatih Degirmencicde0f9d2019-05-09 12:50:05 +0200108 name: DISTRO
109 default: '{distro}'
Fatih Degirmenci9ff8c252019-03-01 15:45:57 +0100110 description: 'Distribution to use for configuring target nodes (networking etc.)'
111 - string:
Fatih Degirmenci78358312019-10-17 11:20:59 +0200112 name: PROVISIONER_TYPE
113 default: '{provisioner-type}'
114 description: 'Provisioner type to use'
115 - string:
Fatih Degirmenciaaf95842019-04-23 17:54:19 +0200116 name: DEPLOY_TYPE
117 default: '{type}'
118 description: 'Type of the deployment'
119 - string:
Fatih Degirmenci78358312019-10-17 11:20:59 +0200120 name: HEAT_ENVIRONMENT_FILENAME
121 default: 'heat-environment-{cloud}-{distro}.yaml'
122 description: 'Name of heat-environment file to use.'
123 - string:
124 name: STACK_NAME
125 default: "nordix-cicd-verify-engine-{distro}-$BUILD_NUMBER"
126 description: 'Name of the created stack'
127 - string:
Fatih Degirmenciecbb1ff2019-12-15 15:30:56 +0100128 name: KEYPAIR_NAME
129 default: "keypair-nordix-cicd-verify-engine-{distro}-$BUILD_NUMBER"
130 description: 'Name of the created keypair'
131 - string:
Fatih Degirmencia5099eb2019-03-21 11:25:55 +0100132 name: USE_PREBUILT_DEPLOYMENT_IMAGE
133 default: 'true'
134 description: 'Use prebuilt deployment image while running as part of CI/CD'
135 - string:
Fatih Degirmenci429341c2019-04-03 11:18:28 -0700136 name: TEST_SUITE
137 default: 'healthcheck'
138 description: 'Test suite to run'
139 - string:
Fatih Degirmenci99f4fb02019-05-08 11:40:27 +0200140 name: YARDSTICK_DISPATCHER
141 default: 'file'
142 description: 'Dispatcher to use for Yardstick reporting'
143 - string:
Fatih Degirmenci78358312019-10-17 11:20:59 +0200144 name: DELETE_STACK
145 default: 'yes'
146 description: 'Delete the stack upon completion of the build'
147 - string:
Fatih Degirmencie8bc4552019-02-15 16:20:23 +0100148 name: CLEANUP
149 default: 'true'
Fatih Degirmenci9ff8c252019-03-01 15:45:57 +0100150 description: 'Cleanup leftovers of the previous run'
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100151
152 properties:
153 - logrotate
154 - build-blocker:
155 use-build-blocker: true
156 blocking-jobs:
Fatih Degirmenci175d55d2019-05-09 15:21:22 +0200157 - 'cloud-infra-verify-engine-.*'
158 - 'cloud-infra-verify-scenario-.*'
159 - 'cloud-infra-periodic-engine-.*'
160 - 'k8-.*'
Fatih Degirmencie9217382019-10-01 16:41:46 +0200161 - 'nolabs-.*'
Fatih Degirmenci885498a2019-02-26 11:02:36 +0100162 block-level: 'NODE'
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100163 - throttle:
164 max-per-node: 1
Fatih Degirmenci885498a2019-02-26 11:02:36 +0100165 max-total: 3
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100166 option: project
167
168 wrappers:
Fatih Degirmenci3fd05cd2019-08-28 09:05:15 +0000169 - credentials-binding:
170 - file:
Fatih Degirmenci78358312019-10-17 11:20:59 +0200171 credential-id: '{openrc-credentials-file}'
Fatih Degirmenci3fd05cd2019-08-28 09:05:15 +0000172 variable: OPENRC_FILE
173 - mask-passwords
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100174 - build-timeout:
Vamsi Savaramc74282a2019-11-14 18:20:46 +0000175 timeout: 150
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100176 - fix-workspace-permissions
Fatih Degirmenci20aedd62019-07-19 15:52:21 +0200177 - openstack:
178 single-use: True
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100179
180 scm:
181 - git-scm-gerrit:
182 ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
183 branch: '{branch}'
184 refspec: $GERRIT_REFSPEC
robert.tomczyk7e507872019-06-18 17:20:26 +0100185 wipe_workspace: true
186 clean_before: false
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100187
188 triggers:
Fatih Degirmencid888b0b2019-05-22 11:04:34 +0200189 - gerrit:
190 server-name: 'Nordix Gerrit'
191 trigger-on:
192 - patchset-created-event:
193 exclude-drafts: 'false'
194 exclude-trivial-rebase: 'false'
195 exclude-no-code-change: 'false'
196 - draft-published-event
197 - comment-added-contains-event:
198 comment-contains-value: 'recheck'
199 - comment-added-contains-event:
200 comment-contains-value: 'reverify'
201 projects:
202 - project-compare-type: 'REG_EXP'
203 project-pattern: 'infra\/engine'
204 branches:
205 - branch-compare-type: 'ANT'
206 branch-pattern: '**/{branch}'
Fatih Degirmencie30037b2020-01-17 11:25:59 +0000207 disable-strict-forbidden-file-verification: 'true'
208 forbidden-file-paths:
209 - compare-type: ANT
210 pattern: 'docs/**'
Fatih Degirmencicde0f9d2019-05-09 12:50:05 +0200211 skip-vote:
212 successful: '{obj:successful}'
213 failed: '{obj:failed}'
214 unstable: '{obj:unstable}'
215 notbuilt: '{obj:notbuilt}'
Fatih Degirmencid888b0b2019-05-22 11:04:34 +0200216 custom-url: '* $JOB_NAME $BUILD_URL'
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100217
218 builders:
Fatih Degirmenci3fd05cd2019-08-28 09:05:15 +0000219 - shell: |
220 #!/bin/bash
Fatih Degirmenci3131a532019-11-29 06:41:44 +0000221 cp $OPENRC_FILE /tmp/openrc
Fatih Degirmencied6187c2019-05-08 08:56:52 +0200222 - 'cloud-infra-determine-scenario-macro'
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100223 - multijob:
224 name: deploy
225 condition: SUCCESSFUL
226 projects:
Fatih Degirmencicde0f9d2019-05-09 12:50:05 +0200227 - name: 'cloud-infra-verify-engine-{distro}-deploy-{type}-{stream}'
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100228 current-parameters: true
229 predefined-parameters: |
Fatih Degirmencicde0f9d2019-05-09 12:50:05 +0200230 DISTRO=$DISTRO
Fatih Degirmenciaaf95842019-04-23 17:54:19 +0200231 DEPLOY_TYPE=$DEPLOY_TYPE
Fatih Degirmenci78358312019-10-17 11:20:59 +0200232 PROVISIONER_TYPE=$PROVISIONER_TYPE
233 STACK_NAME=$STACK_NAME
Fatih Degirmenciecbb1ff2019-12-15 15:30:56 +0100234 KEYPAIR_NAME=$KEYPAIR_NAME
Fatih Degirmenci78358312019-10-17 11:20:59 +0200235 HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
Fatih Degirmencia5099eb2019-03-21 11:25:55 +0100236 USE_PREBUILT_DEPLOYMENT_IMAGE=$USE_PREBUILT_DEPLOYMENT_IMAGE
Fatih Degirmencie8bc4552019-02-15 16:20:23 +0100237 CLEANUP=$CLEANUP
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100238 GERRIT_PROJECT=$GERRIT_PROJECT
239 GERRIT_BRANCH=$GERRIT_BRANCH
240 GERRIT_REFSPEC=$GERRIT_REFSPEC
241 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
242 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
243 node-parameters: true
244 kill-phase-on: FAILURE
245 abort-all-job: true
246 - multijob:
Fatih Degirmenci429341c2019-04-03 11:18:28 -0700247 name: functest
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100248 condition: SUCCESSFUL
249 projects:
Fatih Degirmencicde0f9d2019-05-09 12:50:05 +0200250 - name: 'cloud-infra-verify-engine-{distro}-functest-{type}-{stream}'
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100251 current-parameters: true
252 predefined-parameters: |
Fatih Degirmencicde0f9d2019-05-09 12:50:05 +0200253 DISTRO=$DISTRO
Fatih Degirmenciaaf95842019-04-23 17:54:19 +0200254 DEPLOY_TYPE=$DEPLOY_TYPE
Fatih Degirmenci78358312019-10-17 11:20:59 +0200255 PROVISIONER_TYPE=$PROVISIONER_TYPE
256 STACK_NAME=$STACK_NAME
Fatih Degirmenciecbb1ff2019-12-15 15:30:56 +0100257 KEYPAIR_NAME=$KEYPAIR_NAME
Fatih Degirmenci78358312019-10-17 11:20:59 +0200258 HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
Fatih Degirmencia5099eb2019-03-21 11:25:55 +0100259 USE_PREBUILT_DEPLOYMENT_IMAGE=$USE_PREBUILT_DEPLOYMENT_IMAGE
Fatih Degirmenci429341c2019-04-03 11:18:28 -0700260 TEST_SUITE=$TEST_SUITE
Fatih Degirmenci99f4fb02019-05-08 11:40:27 +0200261 YARDSTICK_DISPATCHER=$YARDSTICK_DISPATCHER
Fatih Degirmencie8bc4552019-02-15 16:20:23 +0100262 CLEANUP=$CLEANUP
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100263 GERRIT_PROJECT=$GERRIT_PROJECT
264 GERRIT_BRANCH=$GERRIT_BRANCH
265 GERRIT_REFSPEC=$GERRIT_REFSPEC
266 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
267 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
268 node-parameters: true
Fatih Degirmenci429341c2019-04-03 11:18:28 -0700269 kill-phase-on: FAILURE
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100270 abort-all-job: true
271
Fatih Degirmenci78358312019-10-17 11:20:59 +0200272 publishers:
273 - postbuildscript:
274 builders:
275 - role: SLAVE
276 build-on:
277 - SUCCESS
278 - FAILURE
279 - ABORTED
280 - NOT_BUILT
281 - UNSTABLE
282 build-steps:
283 - shell:
284 !include-raw-escape: ./wait-for-pkg-manager.sh
285 - shell:
286 !include-raw: ./delete-heat-stack.sh
287
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100288- job-template:
Fatih Degirmencicde0f9d2019-05-09 12:50:05 +0200289 name: 'cloud-infra-verify-engine-{distro}-{phase}-{type}-{stream}'
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100290
291 disabled: false
292
293 concurrent: true
294
295 properties:
296 - logrotate
297
298 parameters:
299 - string:
300 name: PROJECT
301 default: $GERRIT_PROJECT
302 - string:
Fatih Degirmencicde0f9d2019-05-09 12:50:05 +0200303 name: DISTRO
304 default: 'ubuntu1804'
Fatih Degirmenci9ff8c252019-03-01 15:45:57 +0100305 description: 'Distribution to use for configuring target nodes (networking etc.). Overriden by upstream job.'
306 - string:
Fatih Degirmenciaaf95842019-04-23 17:54:19 +0200307 name: DEPLOY_TYPE
308 default: 'virtual'
309 description: 'Type of the deployment. Overriden by upstream job.'
310 - string:
Fatih Degirmenci78358312019-10-17 11:20:59 +0200311 name: PROVISIONER_TYPE
312 default: 'bifrost'
313 description: 'Provisioner type to use. Overriden by upstream job.'
314 - string:
315 name: HEAT_ENVIRONMENT_FILENAME
316 default: "heat-environment-city-ubuntu1804.yaml"
317 description: 'Name of heat-environment file to use.'
318 - string:
319 name: HEAT_ENVIRONMENT_FILE
Fatih Degirmenci1462d452020-01-21 12:12:41 +0100320 default: "file://$WORKSPACE/engine/provisioner/heat/playbooks/roles/bootstrap-hwconfig/files/$HEAT_ENVIRONMENT_FILENAME"
Fatih Degirmenci78358312019-10-17 11:20:59 +0200321 description: 'Location of heat-environment file to use.'
322 - string:
323 name: STACK_NAME
324 default: "nordix-cicd-verify-engine-{distro}-$BUILD_NUMBER"
325 description: 'Name of the created stack'
326 - string:
Fatih Degirmencia5099eb2019-03-21 11:25:55 +0100327 name: USE_PREBUILT_DEPLOYMENT_IMAGE
328 default: 'false'
329 description: 'Use prebuilt deployment image while running as part of CI/CD'
330 - string:
Fatih Degirmenci429341c2019-04-03 11:18:28 -0700331 name: TEST_FW
332 default: '{phase}'
333 description: 'Test framework to use'
334 - string:
335 name: TEST_SUITE
336 default: 'healthcheck'
337 description: 'Test suite to run'
338 - string:
Fatih Degirmenci91429362019-03-25 09:53:32 +0100339 name: TEST_REPO_URL
340 default: 'https://gerrit.nordix.org/infra/test.git'
341 description: 'URL to Nordix Cloud Infra test repository'
342 - string:
Fatih Degirmenci99f4fb02019-05-08 11:40:27 +0200343 name: YARDSTICK_DISPATCHER
344 default: 'file'
345 description: 'Dispatcher to use for Yardstick reporting'
346 - string:
Fatih Degirmencie8bc4552019-02-15 16:20:23 +0100347 name: CLEANUP
348 default: 'false'
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100349
350 wrappers:
Fatih Degirmenci3fd05cd2019-08-28 09:05:15 +0000351 - mask-passwords
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100352 - build-timeout:
Fatih Degirmencie820eb12019-07-27 20:18:14 +0200353 timeout: '{build-timeout}'
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100354 - fix-workspace-permissions
355
356 scm:
357 - git-scm-gerrit:
358 ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
359 branch: '{branch}'
360 refspec: $GERRIT_REFSPEC
robert.tomczyk7e507872019-06-18 17:20:26 +0100361 wipe_workspace: true
362 clean_before: false
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100363
364 builders:
Fatih Degirmencied6187c2019-05-08 08:56:52 +0200365 - 'cloud-infra-determine-scenario-macro'
Fatih Degirmenci0c0e67a2019-04-09 08:39:51 +0200366 - 'cloud-infra-{phase}-macro'
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100367
368# vim: set ts=2 sw=2 expandtab: