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
10 # http://www.apache.org/licenses/LICENSE-2.0
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.
18 # SPDX-License-Identifier: Apache-2.0
19 # ============LICENSE_END=========================================================
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
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
32 # These jobs are set to run on slaves with label vpod-deploy-ubuntu1604.
34 # - Ubuntu1604 as the base distro
35 # - nested virtualization
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
42 # The slaves should not have a cloud infra scenario deployed on them.
43 #--------------------------------------------------------------------------------------
46 name: 'cloud-infra-verify-engine'
48 project: 'infra/engine'
69 openrc-credentials-file: 'est-jenkins-openrcfile-city-karlskrona-onap'
73 provisioner-type: 'bifrost'
76 provisioner-type: 'heat'
77 slave-type: 'jumphost'
86 - 'cloud-infra-verify-engine-{distro}-{cloud}-{type}-{stream}'
87 - 'cloud-infra-verify-engine-{distro}-{phase}-{type}-{stream}'
90 name: 'cloud-infra-verify-engine-{distro}-{cloud}-{type}-{stream}'
92 project-type: multijob
94 disabled: '{obj:disabled}'
102 - nordix-gerrit-parameters
105 default: '{cloud}-{slave-type}-{distro}'
106 description: 'Slave label to schedule this job on. All slaves have Ubuntu1604 no matter what distro target nodes use'
110 description: 'Distribution to use for configuring target nodes (networking etc.)'
112 name: PROVISIONER_TYPE
113 default: '{provisioner-type}'
114 description: 'Provisioner type to use'
118 description: 'Type of the deployment'
120 name: HEAT_ENVIRONMENT_FILENAME
121 default: 'heat-environment-{cloud}-{distro}.yaml'
122 description: 'Name of heat-environment file to use.'
125 default: "nordix-cicd-verify-engine-{distro}-$BUILD_NUMBER"
126 description: 'Name of the created stack'
128 name: USE_PREBUILT_DEPLOYMENT_IMAGE
130 description: 'Use prebuilt deployment image while running as part of CI/CD'
133 default: 'healthcheck'
134 description: 'Test suite to run'
136 name: YARDSTICK_DISPATCHER
138 description: 'Dispatcher to use for Yardstick reporting'
142 description: 'Delete the stack upon completion of the build'
146 description: 'Cleanup leftovers of the previous run'
151 use-build-blocker: true
153 - 'cloud-infra-verify-engine-.*'
154 - 'cloud-infra-verify-scenario-.*'
155 - 'cloud-infra-periodic-engine-.*'
165 - credentials-binding:
167 credential-id: '{openrc-credentials-file}'
168 variable: OPENRC_FILE
172 - fix-workspace-permissions
178 ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
180 refspec: $GERRIT_REFSPEC
186 server-name: 'Nordix Gerrit'
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'
198 - project-compare-type: 'REG_EXP'
199 project-pattern: 'infra\/engine'
201 - branch-compare-type: 'ANT'
202 branch-pattern: '**/{branch}'
204 - compare-type: 'ANT'
207 successful: '{obj:successful}'
208 failed: '{obj:failed}'
209 unstable: '{obj:unstable}'
210 notbuilt: '{obj:notbuilt}'
211 custom-url: '* $JOB_NAME $BUILD_URL'
216 cp $OPENRC_FILE /tmp/openrc
217 - 'cloud-infra-determine-scenario-macro'
220 condition: SUCCESSFUL
222 - name: 'cloud-infra-verify-engine-{distro}-deploy-{type}-{stream}'
223 current-parameters: true
224 predefined-parameters: |
226 DEPLOY_TYPE=$DEPLOY_TYPE
227 PROVISIONER_TYPE=$PROVISIONER_TYPE
228 STACK_NAME=$STACK_NAME
229 HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
230 USE_PREBUILT_DEPLOYMENT_IMAGE=$USE_PREBUILT_DEPLOYMENT_IMAGE
232 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
242 condition: SUCCESSFUL
244 - name: 'cloud-infra-verify-engine-{distro}-functest-{type}-{stream}'
245 current-parameters: true
246 predefined-parameters: |
248 DEPLOY_TYPE=$DEPLOY_TYPE
249 PROVISIONER_TYPE=$PROVISIONER_TYPE
250 STACK_NAME=$STACK_NAME
251 HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
252 USE_PREBUILT_DEPLOYMENT_IMAGE=$USE_PREBUILT_DEPLOYMENT_IMAGE
253 TEST_SUITE=$TEST_SUITE
254 YARDSTICK_DISPATCHER=$YARDSTICK_DISPATCHER
256 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
262 kill-phase-on: FAILURE
277 !include-raw-escape: ./wait-for-pkg-manager.sh
279 !include-raw: ./delete-heat-stack.sh
282 name: 'cloud-infra-verify-engine-{distro}-{phase}-{type}-{stream}'
294 default: $GERRIT_PROJECT
297 default: 'ubuntu1804'
298 description: 'Distribution to use for configuring target nodes (networking etc.). Overriden by upstream job.'
302 description: 'Type of the deployment. Overriden by upstream job.'
304 name: PROVISIONER_TYPE
306 description: 'Provisioner type to use. Overriden by upstream job.'
308 name: HEAT_ENVIRONMENT_FILENAME
309 default: "heat-environment-city-ubuntu1804.yaml"
310 description: 'Name of heat-environment file to use.'
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.'
317 default: "nordix-cicd-verify-engine-{distro}-$BUILD_NUMBER"
318 description: 'Name of the created stack'
320 name: USE_PREBUILT_DEPLOYMENT_IMAGE
322 description: 'Use prebuilt deployment image while running as part of CI/CD'
326 description: 'Test framework to use'
329 default: 'healthcheck'
330 description: 'Test suite to run'
333 default: 'https://gerrit.nordix.org/infra/test.git'
334 description: 'URL to Nordix Cloud Infra test repository'
336 name: YARDSTICK_DISPATCHER
338 description: 'Dispatcher to use for Yardstick reporting'
346 timeout: '{build-timeout}'
347 - fix-workspace-permissions
351 ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
353 refspec: $GERRIT_REFSPEC
358 - 'cloud-infra-determine-scenario-macro'
359 - 'cloud-infra-{phase}-macro'
361 # vim: set ts=2 sw=2 expandtab: