blob: 33447806d972787c0136539dd262664475962e74 [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
57 successful: false
58 failed: false
59 unstable: false
60 notbuilt: false
Fatih Degirmencia71174c2019-02-28 10:19:43 +010061 - centos7:
Fatih Degirmencif6d92e92019-06-25 11:14:22 +020062 disabled: true
Fatih Degirmencicde0f9d2019-05-09 12:50:05 +020063 successful: true
64 failed: true
65 unstable: true
66 notbuilt: true
Fatih Degirmenci78358312019-10-17 11:20:59 +020067 cloud:
68 - city:
Fatih Degirmenci78358312019-10-17 11:20:59 +020069 openrc-credentials-file: 'est-jenkins-openrcfile-city-karlskrona-onap'
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +010070
71 type:
Fatih Degirmenci78358312019-10-17 11:20:59 +020072 - virtual:
73 provisioner-type: 'bifrost'
Fatih Degirmenci8f980952019-10-17 14:56:04 +020074 slave-type: 'vpod'
Fatih Degirmenci78358312019-10-17 11:20:59 +020075 - cloud:
76 provisioner-type: 'heat'
Fatih Degirmenci8f980952019-10-17 14:56:04 +020077 slave-type: 'jumphost'
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 Degirmencia5099eb2019-03-21 11:25:55 +0100128 name: USE_PREBUILT_DEPLOYMENT_IMAGE
129 default: 'true'
130 description: 'Use prebuilt deployment image while running as part of CI/CD'
131 - string:
Fatih Degirmenci429341c2019-04-03 11:18:28 -0700132 name: TEST_SUITE
133 default: 'healthcheck'
134 description: 'Test suite to run'
135 - string:
Fatih Degirmenci99f4fb02019-05-08 11:40:27 +0200136 name: YARDSTICK_DISPATCHER
137 default: 'file'
138 description: 'Dispatcher to use for Yardstick reporting'
139 - string:
Fatih Degirmenci78358312019-10-17 11:20:59 +0200140 name: DELETE_STACK
141 default: 'yes'
142 description: 'Delete the stack upon completion of the build'
143 - string:
Fatih Degirmencie8bc4552019-02-15 16:20:23 +0100144 name: CLEANUP
145 default: 'true'
Fatih Degirmenci9ff8c252019-03-01 15:45:57 +0100146 description: 'Cleanup leftovers of the previous run'
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100147
148 properties:
149 - logrotate
150 - build-blocker:
151 use-build-blocker: true
152 blocking-jobs:
Fatih Degirmenci175d55d2019-05-09 15:21:22 +0200153 - 'cloud-infra-verify-engine-.*'
154 - 'cloud-infra-verify-scenario-.*'
155 - 'cloud-infra-periodic-engine-.*'
156 - 'k8-.*'
Fatih Degirmencie9217382019-10-01 16:41:46 +0200157 - 'nolabs-.*'
Fatih Degirmenci885498a2019-02-26 11:02:36 +0100158 block-level: 'NODE'
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100159 - throttle:
160 max-per-node: 1
Fatih Degirmenci885498a2019-02-26 11:02:36 +0100161 max-total: 3
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100162 option: project
163
164 wrappers:
Fatih Degirmenci3fd05cd2019-08-28 09:05:15 +0000165 - credentials-binding:
166 - file:
Fatih Degirmenci78358312019-10-17 11:20:59 +0200167 credential-id: '{openrc-credentials-file}'
Fatih Degirmenci3fd05cd2019-08-28 09:05:15 +0000168 variable: OPENRC_FILE
169 - mask-passwords
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100170 - build-timeout:
Vamsi Savaramc74282a2019-11-14 18:20:46 +0000171 timeout: 150
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100172 - fix-workspace-permissions
Fatih Degirmenci20aedd62019-07-19 15:52:21 +0200173 - openstack:
174 single-use: True
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100175
176 scm:
177 - git-scm-gerrit:
178 ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
179 branch: '{branch}'
180 refspec: $GERRIT_REFSPEC
robert.tomczyk7e507872019-06-18 17:20:26 +0100181 wipe_workspace: true
182 clean_before: false
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100183
184 triggers:
Fatih Degirmencid888b0b2019-05-22 11:04:34 +0200185 - gerrit:
186 server-name: 'Nordix Gerrit'
187 trigger-on:
188 - patchset-created-event:
189 exclude-drafts: 'false'
190 exclude-trivial-rebase: 'false'
191 exclude-no-code-change: 'false'
192 - draft-published-event
193 - comment-added-contains-event:
194 comment-contains-value: 'recheck'
195 - comment-added-contains-event:
196 comment-contains-value: 'reverify'
197 projects:
198 - project-compare-type: 'REG_EXP'
199 project-pattern: 'infra\/engine'
200 branches:
201 - branch-compare-type: 'ANT'
202 branch-pattern: '**/{branch}'
203 file-paths:
204 - compare-type: 'ANT'
205 pattern: '**'
Fatih Degirmencicde0f9d2019-05-09 12:50:05 +0200206 skip-vote:
207 successful: '{obj:successful}'
208 failed: '{obj:failed}'
209 unstable: '{obj:unstable}'
210 notbuilt: '{obj:notbuilt}'
Fatih Degirmencid888b0b2019-05-22 11:04:34 +0200211 custom-url: '* $JOB_NAME $BUILD_URL'
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100212
213 builders:
Fatih Degirmenci3fd05cd2019-08-28 09:05:15 +0000214 - shell: |
215 #!/bin/bash
216 cp $OPENRC_FILE /tmp/openrc
Fatih Degirmencied6187c2019-05-08 08:56:52 +0200217 - 'cloud-infra-determine-scenario-macro'
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100218 - multijob:
219 name: deploy
220 condition: SUCCESSFUL
221 projects:
Fatih Degirmencicde0f9d2019-05-09 12:50:05 +0200222 - name: 'cloud-infra-verify-engine-{distro}-deploy-{type}-{stream}'
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100223 current-parameters: true
224 predefined-parameters: |
Fatih Degirmencicde0f9d2019-05-09 12:50:05 +0200225 DISTRO=$DISTRO
Fatih Degirmenciaaf95842019-04-23 17:54:19 +0200226 DEPLOY_TYPE=$DEPLOY_TYPE
Fatih Degirmenci78358312019-10-17 11:20:59 +0200227 PROVISIONER_TYPE=$PROVISIONER_TYPE
228 STACK_NAME=$STACK_NAME
229 HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
Fatih Degirmencia5099eb2019-03-21 11:25:55 +0100230 USE_PREBUILT_DEPLOYMENT_IMAGE=$USE_PREBUILT_DEPLOYMENT_IMAGE
Fatih Degirmencie8bc4552019-02-15 16:20:23 +0100231 CLEANUP=$CLEANUP
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100232 GERRIT_PROJECT=$GERRIT_PROJECT
233 GERRIT_BRANCH=$GERRIT_BRANCH
234 GERRIT_REFSPEC=$GERRIT_REFSPEC
235 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
236 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
237 node-parameters: true
238 kill-phase-on: FAILURE
239 abort-all-job: true
240 - multijob:
Fatih Degirmenci429341c2019-04-03 11:18:28 -0700241 name: functest
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100242 condition: SUCCESSFUL
243 projects:
Fatih Degirmencicde0f9d2019-05-09 12:50:05 +0200244 - name: 'cloud-infra-verify-engine-{distro}-functest-{type}-{stream}'
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100245 current-parameters: true
246 predefined-parameters: |
Fatih Degirmencicde0f9d2019-05-09 12:50:05 +0200247 DISTRO=$DISTRO
Fatih Degirmenciaaf95842019-04-23 17:54:19 +0200248 DEPLOY_TYPE=$DEPLOY_TYPE
Fatih Degirmenci78358312019-10-17 11:20:59 +0200249 PROVISIONER_TYPE=$PROVISIONER_TYPE
250 STACK_NAME=$STACK_NAME
251 HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
Fatih Degirmencia5099eb2019-03-21 11:25:55 +0100252 USE_PREBUILT_DEPLOYMENT_IMAGE=$USE_PREBUILT_DEPLOYMENT_IMAGE
Fatih Degirmenci429341c2019-04-03 11:18:28 -0700253 TEST_SUITE=$TEST_SUITE
Fatih Degirmenci99f4fb02019-05-08 11:40:27 +0200254 YARDSTICK_DISPATCHER=$YARDSTICK_DISPATCHER
Fatih Degirmencie8bc4552019-02-15 16:20:23 +0100255 CLEANUP=$CLEANUP
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100256 GERRIT_PROJECT=$GERRIT_PROJECT
257 GERRIT_BRANCH=$GERRIT_BRANCH
258 GERRIT_REFSPEC=$GERRIT_REFSPEC
259 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
260 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
261 node-parameters: true
Fatih Degirmenci429341c2019-04-03 11:18:28 -0700262 kill-phase-on: FAILURE
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100263 abort-all-job: true
264
Fatih Degirmenci78358312019-10-17 11:20:59 +0200265 publishers:
266 - postbuildscript:
267 builders:
268 - role: SLAVE
269 build-on:
270 - SUCCESS
271 - FAILURE
272 - ABORTED
273 - NOT_BUILT
274 - UNSTABLE
275 build-steps:
276 - shell:
277 !include-raw-escape: ./wait-for-pkg-manager.sh
278 - shell:
279 !include-raw: ./delete-heat-stack.sh
280
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100281- job-template:
Fatih Degirmencicde0f9d2019-05-09 12:50:05 +0200282 name: 'cloud-infra-verify-engine-{distro}-{phase}-{type}-{stream}'
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100283
284 disabled: false
285
286 concurrent: true
287
288 properties:
289 - logrotate
290
291 parameters:
292 - string:
293 name: PROJECT
294 default: $GERRIT_PROJECT
295 - string:
Fatih Degirmencicde0f9d2019-05-09 12:50:05 +0200296 name: DISTRO
297 default: 'ubuntu1804'
Fatih Degirmenci9ff8c252019-03-01 15:45:57 +0100298 description: 'Distribution to use for configuring target nodes (networking etc.). Overriden by upstream job.'
299 - string:
Fatih Degirmenciaaf95842019-04-23 17:54:19 +0200300 name: DEPLOY_TYPE
301 default: 'virtual'
302 description: 'Type of the deployment. Overriden by upstream job.'
303 - string:
Fatih Degirmenci78358312019-10-17 11:20:59 +0200304 name: PROVISIONER_TYPE
305 default: 'bifrost'
306 description: 'Provisioner type to use. Overriden by upstream job.'
307 - string:
308 name: HEAT_ENVIRONMENT_FILENAME
309 default: "heat-environment-city-ubuntu1804.yaml"
310 description: 'Name of heat-environment file to use.'
311 - string:
312 name: HEAT_ENVIRONMENT_FILE
313 default: "file://$WORKSPACE/engine/provisioner/heat/playbooks/roles/install-configure-heat/files/$HEAT_ENVIRONMENT_FILENAME"
314 description: 'Location of heat-environment file to use.'
315 - string:
316 name: STACK_NAME
317 default: "nordix-cicd-verify-engine-{distro}-$BUILD_NUMBER"
318 description: 'Name of the created stack'
319 - string:
Fatih Degirmencia5099eb2019-03-21 11:25:55 +0100320 name: USE_PREBUILT_DEPLOYMENT_IMAGE
321 default: 'false'
322 description: 'Use prebuilt deployment image while running as part of CI/CD'
323 - string:
Fatih Degirmenci429341c2019-04-03 11:18:28 -0700324 name: TEST_FW
325 default: '{phase}'
326 description: 'Test framework to use'
327 - string:
328 name: TEST_SUITE
329 default: 'healthcheck'
330 description: 'Test suite to run'
331 - string:
Fatih Degirmenci91429362019-03-25 09:53:32 +0100332 name: TEST_REPO_URL
333 default: 'https://gerrit.nordix.org/infra/test.git'
334 description: 'URL to Nordix Cloud Infra test repository'
335 - string:
Fatih Degirmenci99f4fb02019-05-08 11:40:27 +0200336 name: YARDSTICK_DISPATCHER
337 default: 'file'
338 description: 'Dispatcher to use for Yardstick reporting'
339 - string:
Fatih Degirmencie8bc4552019-02-15 16:20:23 +0100340 name: CLEANUP
341 default: 'false'
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100342
343 wrappers:
Fatih Degirmenci3fd05cd2019-08-28 09:05:15 +0000344 - mask-passwords
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100345 - build-timeout:
Fatih Degirmencie820eb12019-07-27 20:18:14 +0200346 timeout: '{build-timeout}'
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100347 - fix-workspace-permissions
348
349 scm:
350 - git-scm-gerrit:
351 ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
352 branch: '{branch}'
353 refspec: $GERRIT_REFSPEC
robert.tomczyk7e507872019-06-18 17:20:26 +0100354 wipe_workspace: true
355 clean_before: false
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100356
357 builders:
Fatih Degirmencied6187c2019-05-08 08:56:52 +0200358 - 'cloud-infra-determine-scenario-macro'
Fatih Degirmenci0c0e67a2019-04-09 08:39:51 +0200359 - 'cloud-infra-{phase}-macro'
Fatih Degirmenci6b4d2852019-02-07 11:24:29 +0100360
361# vim: set ts=2 sw=2 expandtab: