blob: 52bf8f91fb17615b6157e0fc43ebf04ab1a630f1 [file] [log] [blame]
Fatih Degirmencia577ca92019-12-06 14:04:43 +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
21#--------------------------------------------------------------------------------------
22# The jobs declared in this JJB configuration file are used for deploying and testing
23# Spinnaker using k8-calico-spinnaker scenario.
24#--------------------------------------------------------------------------------------
25
26- project:
27 name: 'cloud-infra-periodic-spinnaker'
28
29 project: 'infra/engine'
30
31 cloud:
32 - city:
33 slave-label: 'city-jumphost-ubuntu1804'
34 openrc-credentials-file: 'est-jenkins-openrcfile-city-frankfurt-onap'
Fatih Degirmencic00cedf2020-01-06 19:29:19 +010035 daily-trigger: '@daily'
Fatih Degirmencia577ca92019-12-06 14:04:43 +010036
37 spinnaker-branch:
Fatih Degirmenciba170a42019-12-11 10:12:04 +010038 - '1.16':
Fatih Degirmencia577ca92019-12-06 14:04:43 +010039 nordix-branch: master
40 engine-version: master
41 engine-refspec: master
42 deploy-scenario: 'k8-calico-spinnaker'
43 deploy-scenario-version: master
44 deploy-scenario-refspec: master
Fatih Degirmencic00cedf2020-01-06 19:29:19 +010045 keypair-name: 'keypair-nordix-cicd-{deploy-scenario}-1_16'
Fatih Degirmencia577ca92019-12-06 14:04:43 +010046 disabled: false
47 delete-stack: 'yes'
48
49 distro:
50 - ubuntu1804
51
52 ci-loop:
53 - daily
54
55 type:
56 - cloud:
57 pod-name: est-cloud
58 provisioner-type: heat
59 installer-type: kubespray
60
61 phase:
62 - spinnaker-deploy:
63 build-timeout: 60
64 - spinnaker-test:
65 build-timeout: 60
66 - promote-spinnaker:
67 build-timeout: 60
68
69 jobs:
70 - 'k8-calico-spinnaker-{distro}-{installer-type}-{cloud}-{type}-{ci-loop}-{spinnaker-branch}'
71 - '{phase}-{distro}-{installer-type}-{type}-{ci-loop}-{spinnaker-branch}'
72
73- job-template:
74 name: 'k8-calico-spinnaker-{distro}-{installer-type}-{cloud}-{type}-{ci-loop}-{spinnaker-branch}'
75
76 project-type: multijob
77
78 disabled: '{obj:disabled}'
79
80 concurrent: false
81
82 parameters:
83 - project-parameters:
84 project: '{project}'
85 branch: '{nordix-branch}'
86 - nordix-gerrit-parameters
87 - label:
88 name: SLAVE_LABEL
89 default: '{slave-label}'
90 description: 'Slave label to schedule this job on. All slaves have Ubuntu1604 no matter what distro target nodes use'
91 - string:
92 name: PROVISIONER_TYPE
93 default: 'heat'
94 description: 'Provisioner to use for provisioning nodes'
95 - string:
96 name: INSTALLER_TYPE
97 default: 'kubespray'
98 description: 'Installer to use for deploying the scenario'
99 - string:
100 name: DEPLOY_SCENARIO
101 default: 'k8-calico-spinnaker'
102 description: 'Scenario to deploy and test'
103 - string:
104 name: DEPLOY_TYPE
105 default: 'cloud'
106 description: 'Type of the deployment'
107 - string:
108 name: DISTRO
109 default: '{distro}'
110 description: 'Distribution to use for configuring target nodes (networking etc.)'
111 - string:
112 name: OPENSTACK_CLOUD_PROVIDER
113 default: '{cloud}'
114 description: 'Name of the cloud where this job is run'
115 - string:
116 name: SPINNAKER_VERSION
117 default: '{spinnaker-branch}'
118 description: 'Spinnaker version to deploy'
119 - string:
120 name: STACK_NAME
121 default: 'nordix-cicd-{deploy-scenario}-{spinnaker-branch}'
122 - string:
Fatih Degirmencic00cedf2020-01-06 19:29:19 +0100123 name: KEYPAIR_NAME
124 default: '{keypair-name}'
125 - string:
Fatih Degirmencia577ca92019-12-06 14:04:43 +0100126 name: HEAT_ENVIRONMENT_FILENAME
127 default: "heat-environment-full.yaml"
128 description: 'Heat environment file to use for creating the stack'
129 - string:
130 name: ENGINE_VERSION
131 default: '{engine-version}'
132 description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying Spinnaker. Could be sha, branch'
133 - string:
134 name: ENGINE_REFSPEC
135 default: '{engine-refspec}'
136 description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying Spinnaker. Must be refspec.'
137 - string:
138 name: DEPLOY_SCENARIO_VERSION
139 default: '{deploy-scenario-version}'
140 description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying Spinnaker. Depends on DEPLOY_SCENARIO_REFSPEC and could be sha, branch.'
141 - string:
142 name: DEPLOY_SCENARIO_REFSPEC
143 default: '{deploy-scenario-refspec}'
144 description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying Spinnaker. Depends on DEPLOY_SCENARIO_VERSION and must be refspec.'
145 - string:
146 name: POD_NAME
147 default: '{pod-name}'
148 description: 'Development purposes only! Set to none for disabling test results DB reporting.'
149 - string:
150 name: DELETE_STACK
151 default: '{delete-stack}'
152 description: 'Development purposes only! Whether delete the stack or not. It must either be yes or no. Setting this to no will increase the cost!'
153
154 properties:
155 - logrotate
156 - build-blocker:
157 use-build-blocker: true
158 blocking-jobs:
159 - 'cloud-infra-periodic-engine-.*'
160 - 'onap-.*'
161 - 'k8-.*'
162 block-level: 'NODE'
163 - throttle:
164 max-per-node: 1
165 max-total: 1
166 option: project
167
168 wrappers:
169 - credentials-binding:
170 - file:
171 credential-id: '{openrc-credentials-file}'
172 variable: OPENRC_FILE
173 - mask-passwords
174 - build-timeout:
175 timeout: 630
176 - fix-workspace-permissions
177 - openstack:
178 single-use: True
179
180 triggers:
181 - timed: '{daily-trigger}'
182
183 scm:
184 - git-scm:
185 ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
186 branch: '{nordix-branch}'
187 refspec: ''
188 wipe_workspace: true
189 clean_before: false
190
191 builders:
192 - description-setter:
193 description: $DEPLOY_SCENARIO | Spinnaker $SPINNAKER_VERSION
194 - shell: |
195 #!/bin/bash
196 /bin/rm -rf /tmp/openrc && /bin/cp -f $OPENRC_FILE /tmp/openrc
197 - multijob:
198 name: Deploy Spinnaker using Helm
199 condition: ALWAYS
200 projects:
201 - name: 'spinnaker-deploy-{distro}-{installer-type}-{type}-{ci-loop}-{spinnaker-branch}'
202 current-parameters: false
203 predefined-parameters: |
204 DISTRO=$DISTRO
205 OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
206 DEPLOY_TYPE=$DEPLOY_TYPE
207 PROVISIONER_TYPE=$PROVISIONER_TYPE
208 INSTALLER_TYPE=$INSTALLER_TYPE
209 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
210 SPINNAKER_VERSION=$SPINNAKER_VERSION
211 POD_NAME=$POD_NAME
212 STACK_NAME=$STACK_NAME
213 HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
214 ENGINE_VERSION=$ENGINE_VERSION
215 ENGINE_REFSPEC=$ENGINE_REFSPEC
216 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
217 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
218 git-revision: true
219 node-parameters: true
220 kill-phase-on: NEVER
221 abort-all-job: false
222 - multijob:
223 name: Test Spinnaker Deployment (not activated)
224 condition: ALWAYS
225 projects:
226 - name: 'spinnaker-test-{distro}-{installer-type}-{type}-{ci-loop}-{spinnaker-branch}'
227 current-parameters: false
228 predefined-parameters: |
229 DISTRO=$DISTRO
230 OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
231 DEPLOY_TYPE=$DEPLOY_TYPE
232 PROVISIONER_TYPE=$PROVISIONER_TYPE
233 INSTALLER_TYPE=$INSTALLER_TYPE
234 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
235 SPINNAKER_VERSION=$SPINNAKER_VERSION
236 POD_NAME=$POD_NAME
237 STACK_NAME=$STACK_NAME
238 HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
239 ENGINE_VERSION=$ENGINE_VERSION
240 ENGINE_REFSPEC=$ENGINE_REFSPEC
241 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
242 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
243 git-revision: true
244 node-parameters: true
245 kill-phase-on: NEVER
246 abort-all-job: false
247 - multijob:
248 name: Promote Spinnaker (not activated)
249 condition: ALWAYS
250 projects:
251 - name: 'promote-spinnaker-{distro}-{installer-type}-{type}-{ci-loop}-{spinnaker-branch}'
252 current-parameters: false
253 predefined-parameters: |
254 DISTRO=$DISTRO
255 OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
256 DEPLOY_TYPE=$DEPLOY_TYPE
257 PROVISIONER_TYPE=$PROVISIONER_TYPE
258 INSTALLER_TYPE=$INSTALLER_TYPE
259 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
260 SPINNAKER_VERSION=$SPINNAKER_VERSION
261 POD_NAME=$POD_NAME
262 STACK_NAME=$STACK_NAME
263 HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
264 ENGINE_VERSION=$ENGINE_VERSION
265 ENGINE_REFSPEC=$ENGINE_REFSPEC
266 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
267 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
268 git-revision: true
269 node-parameters: true
270 kill-phase-on: NEVER
271 abort-all-job: false
272
273 publishers:
274 - postbuildscript:
275 builders:
276 - role: SLAVE
277 build-on:
278 - SUCCESS
279 - FAILURE
280 - ABORTED
281 - NOT_BUILT
282 - UNSTABLE
283 build-steps:
284 - shell:
285 !include-raw-escape: ./wait-for-pkg-manager.sh
286 - shell:
287 !include-raw: ./delete-heat-stack.sh
288
289- job-template:
290 name: '{phase}-{distro}-{installer-type}-{type}-{ci-loop}-{spinnaker-branch}'
291
292 disabled: false
293
294 concurrent: false
295
296 properties:
297 - logrotate
298
299 parameters:
300 - project-parameters:
301 project: '{project}'
302 branch: '{nordix-branch}'
303 - nordix-gerrit-parameters
304 - label:
305 name: SLAVE_LABEL
306 default: 'city-jumphost-ubuntu1804'
307 description: 'Slave label to schedule this job on. All slaves have Ubuntu1604 no matter what distro target nodes use'
308 - string:
309 name: PROVISIONER_TYPE
310 default: 'heat'
311 description: 'Provisioner to use for provisioning nodes'
312 - string:
313 name: INSTALLER_TYPE
314 default: 'kubespray'
315 description: 'Installer to use for deploying the scenario'
316 - string:
317 name: DEPLOY_SCENARIO
318 default: 'k8-calico-spinnaker'
319 description: 'Scenario to deploy and test'
320 - string:
321 name: DEPLOY_TYPE
322 default: 'cloud'
323 description: 'Type of the deployment'
324 - string:
325 name: DISTRO
326 default: '{distro}'
327 description: 'Distribution to use for configuring target nodes (networking etc.)'
328 - string:
329 name: OPENSTACK_CLOUD_PROVIDER
330 default: '{cloud}'
331 description: 'Name of the cloud where this job is run'
332 - string:
333 name: SPINNAKER_VERSION
334 default: '{spinnaker-branch}'
335 description: 'Spinnaker version to deploy'
336 - string:
337 name: STACK_NAME
338 default: 'nordix-cicd-{deploy-scenario}-{spinnaker-branch}'
339 - string:
340 name: HEAT_ENVIRONMENT_FILENAME
341 default: "heat-environment-full.yaml"
Fatih Degirmencib6a4ff12019-12-06 14:35:07 +0100342 description: 'Heat environment filename to use for creating the stack'
343 - string:
344 name: HEAT_ENVIRONMENT_FILE
Fatih Degirmencid559c292020-01-07 22:11:27 +0100345 default: "file:///opt/engine/.cache/repos/swconfig/scenarios/$DEPLOY_SCENARIO/$INSTALLER_TYPE/role/$DEPLOY_SCENARIO/files/$HEAT_ENVIRONMENT_FILENAME"
Fatih Degirmencib6a4ff12019-12-06 14:35:07 +0100346 description: 'Heat environment file location to use for creating the stack'
Fatih Degirmencia577ca92019-12-06 14:04:43 +0100347 - string:
348 name: ENGINE_VERSION
349 default: '{engine-version}'
350 description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying Spinnaker. Could be sha, branch'
351 - string:
352 name: ENGINE_REFSPEC
353 default: '{engine-refspec}'
354 description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying Spinnaker. Must be refspec.'
355 - string:
356 name: DEPLOY_SCENARIO_VERSION
357 default: '{deploy-scenario-version}'
358 description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying Spinnaker. Depends on DEPLOY_SCENARIO_REFSPEC and could be sha, branch.'
359 - string:
360 name: DEPLOY_SCENARIO_REFSPEC
361 default: '{deploy-scenario-refspec}'
362 description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying Spinnaker. Depends on DEPLOY_SCENARIO_VERSION and must be refspec.'
363 - string:
364 name: POD_NAME
365 default: '{pod-name}'
366 description: 'Development purposes only! Set to none for disabling test results DB reporting.'
367 - string:
368 name: DELETE_STACK
369 default: '{delete-stack}'
370 description: 'Development purposes only! Whether delete the stack or not. It must either be yes or no. Setting this to no will increase the cost!'
371
372 wrappers:
373 - mask-passwords
374 - build-timeout:
375 timeout: '{build-timeout}'
376 - fix-workspace-permissions
377 - credentials-binding:
378 - username-password-separated:
379 credential-id: 'nordix-cicd-arm-credentials'
380 username: NORDIX_ARM_USERNAME
381 password: NORDIX_ARM_TOKEN
382 - username-password-separated:
383 credential-id: 'nordix-cicd-harbor-credentials'
384 username: NORDIX_HARBOR_USERNAME
385 password: NORDIX_HARBOR_PASSWORD
386
387 scm:
388 - git-scm:
389 ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
390 branch: '{nordix-branch}'
391 refspec: ''
392 wipe_workspace: true
393 clean_before: false
394
395 builders:
396 - description-setter:
397 description: $DEPLOY_SCENARIO | Spinnaker $SPINNAKER_VERSION | $OPENSTACK_CLOUD_PROVIDER
398 - '{phase}-macro'
399
400# vim: set ts=2 sw=2 expandtab: