blob: 61d9d18bf233f658adac52f251cbfc9cd0d2a3e1 [file] [log] [blame]
Fatih Degirmenci471f8d92020-03-13 12:18:42 +00001---
2# ============LICENSE_START=======================================================
3# Copyright (C) 2019 Nordix Foundation.
4# ================================================================================
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16#
17# SPDX-License-Identifier: Apache-2.0
18# ============LICENSE_END=========================================================
19
20- project:
21 name: 'engine-verify-online-deploy-test'
22
23 project: 'engine-verify-online-deploy-test'
24
25 stream:
26 - 'master':
27 branch: '{stream}'
28
29 phase:
30 - deploy
31 - test
32
33 type:
34 - virtual:
35 provisioner-type: 'bifrost'
36 slave-type: 'vpod'
37 - cloud:
38 provisioner-type: 'heat'
39 slave-type: 'jumphost'
40
41 distro:
42 - ubuntu1804
43
44 cloud:
45 - city:
46 openrc-credentials-file: 'est-jenkins-openrcfile-city-karlskrona-onap'
47
48 jobs:
49 - 'engine-verify-online-deploy-test-{distro}-{cloud}-{type}-{stream}'
50 - 'engine-verify-online-{phase}-{distro}-{cloud}-{type}-{stream}'
51
52- job-template:
53 name: 'engine-verify-online-deploy-test-{distro}-{cloud}-{type}-{stream}'
54
55 project-type: multijob
56
57 disabled: '{obj:disabled}'
58
59 concurrent: true
60
61 parameters:
62 - project-parameters:
63 project: $GERRIT_PROJECT
64 branch: '{branch}'
65 description: 'The project and branch which the change is proposed for'
66 - label:
67 name: SLAVE_LABEL
68 default: 'engine-{slave-type}-online-{distro}'
69 description: 'Slave label to schedule this job on.'
70 - string:
71 name: PROVISIONER_TYPE
72 default: '{provisioner-type}'
73 description: 'Provisioner type to use'
74 - string:
75 name: HEAT_ENVIRONMENT_FILENAME
76 default: 'heat-environment-{cloud}-{distro}.yaml'
77 description: 'Name of heat-environment file to use.'
78 - string:
79 name: STACK_NAME
80 default: "nordix-cicd-verify-engine-{distro}-$BUILD_NUMBER"
81 description: 'Name of the created stack'
82 - string:
83 name: KEYPAIR_NAME
84 default: "keypair-nordix-cicd-verify-engine-{distro}-$BUILD_NUMBER"
85 description: 'Name of the created keypair'
86 - string:
87 name: USE_PREBUILT_DEPLOYMENT_IMAGE
88 default: 'true'
89 description: 'Use prebuilt deployment image while running as part of CI/CD'
90 - string:
91 name: TEST_SUITE
92 default: 'healthcheck'
93 description: 'Test suite to run'
94 - string:
95 name: YARDSTICK_DISPATCHER
96 default: 'file'
97 description: 'Dispatcher to use for Yardstick reporting'
98 - string:
99 name: DELETE_STACK
100 default: 'yes'
101 description: 'Delete the stack upon completion of the build'
102
103 properties:
104 - logrotate
Fatih Degirmenci79e736b2020-03-13 16:24:37 +0000105# - build-blocker:
106# use-build-blocker: true
107# blocking-jobs:
108# - 'engine-verify-online-deploy-test-.*'
109# - 'engine-verify-offline-deploy-test-.*'
110# block-level: 'NODE'
Fatih Degirmenci471f8d92020-03-13 12:18:42 +0000111 - throttle:
112 max-per-node: 1
113 max-total: 3
114 option: project
115
116 wrappers:
117 - build-timeout:
118 timeout: 180
119 - credentials-binding:
120 - file:
121 credential-id: '{openrc-credentials-file}'
122 variable: OPENRC_FILE
123 - username-password-separated:
124 credential-id: 'nordix-cicd-arm-credentials'
125 username: NORDIX_ARM_USERNAME
126 password: NORDIX_ARM_TOKEN
127 - mask-passwords
128 - fix-workspace-permissions
129 - openstack:
130 single-use: True
131
132 scm:
133 - git-scm-gerrit:
134 ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
135 branch: '{branch}'
136 refspec: $GERRIT_REFSPEC
137 wipe_workspace: true
138 clean_before: false
139
140 builders:
Fatih Degirmenci79e736b2020-03-13 16:24:37 +0000141 - 'engine-generate-ssh-keypair-macro'
142 - 'engine-download-artifact-macro'
Fatih Degirmenci471f8d92020-03-13 12:18:42 +0000143 - multijob:
Fatih Degirmenci79e736b2020-03-13 16:24:37 +0000144 name: "Online Deployment on {type} instances"
Fatih Degirmenci471f8d92020-03-13 12:18:42 +0000145 condition: SUCCESSFUL
146 execution-type: PARALLEL
147 projects:
148 - name: 'engine-verify-online-deploy-{distro}-city-{type}-master'
149 current-parameters: true
150 node-parameters: true
151 kill-phase-on: FAILURE
152 abort-all-job: true
153 - multijob:
Fatih Degirmenci79e736b2020-03-13 16:24:37 +0000154 name: "Online Testing on {type} instances"
Fatih Degirmenci471f8d92020-03-13 12:18:42 +0000155 condition: SUCCESSFUL
156 execution-type: PARALLEL
157 projects:
158 - name: 'engine-verify-online-test-{distro}-city-{type}-master'
159 current-parameters: true
160 node-parameters: true
161 kill-phase-on: FAILURE
162 abort-all-job: true
Fatih Degirmenci79e736b2020-03-13 16:24:37 +0000163 - conditional-step:
164 condition-kind: and
165 condition-operands:
166 - condition-kind: strings-match
167 condition-string1: $DELETE_STACK
168 condition-string2: true
169 - condition-kind: strings-match
170 condition-string1: $PROVISIONER_TYPE
171 condition-string2: heat
172 on-evaluation-failure: dont-run
173 steps:
174 - 'engine-delete-stack-macro'
Fatih Degirmenci471f8d92020-03-13 12:18:42 +0000175
176- job-template:
177 name: 'engine-verify-online-{phase}-{distro}-{cloud}-{type}-{stream}'
178
179 disabled: '{obj:disabled}'
180
181 concurrent: true
182
183 properties:
184 - logrotate
Fatih Degirmenci471f8d92020-03-13 12:18:42 +0000185 - throttle:
186 max-per-node: 1
187 max-total: 3
188 option: project
189
190 wrappers:
191 - build-timeout:
192 timeout: 180
193 - credentials-binding:
194 - file:
195 credential-id: '{openrc-credentials-file}'
196 variable: OPENRC_FILE
197 - username-password-separated:
198 credential-id: 'nordix-cicd-arm-credentials'
199 username: NORDIX_ARM_USERNAME
200 password: NORDIX_ARM_TOKEN
201 - mask-passwords
202 - fix-workspace-permissions
Fatih Degirmenci471f8d92020-03-13 12:18:42 +0000203
204 scm:
205 - git-scm-gerrit:
206 ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
207 branch: '{branch}'
208 refspec: $GERRIT_REFSPEC
209 wipe_workspace: true
210 clean_before: false
211
212 builders:
Fatih Degirmenci79e736b2020-03-13 16:24:37 +0000213 - 'engine-{phase}-macro'