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 deploying and testing
23 # Spinnaker using k8-calico-spinnaker scenario.
24 #--------------------------------------------------------------------------------------
27 name: 'cloud-infra-periodic-spinnaker'
29 project: 'infra/engine'
33 slave-label: 'city-jumphost-ubuntu1804'
34 openrc-credentials-file: 'est-jenkins-openrcfile-city-frankfurt-onap'
35 daily-trigger: '@daily'
40 engine-version: master
41 engine-refspec: master
42 deploy-scenario: 'k8-calico-spinnaker'
43 deploy-scenario-version: master
44 deploy-scenario-refspec: master
50 engine-version: master
51 engine-refspec: master
52 deploy-scenario: 'k8-calico-spinnaker'
53 deploy-scenario-version: master
54 deploy-scenario-refspec: master
67 provisioner-type: heat
68 installer-type: kubespray
79 - 'k8-calico-spinnaker-{distro}-{installer-type}-{cloud}-{type}-{ci-loop}-{spinnaker-branch}'
80 - '{phase}-{distro}-{installer-type}-{type}-{ci-loop}-{spinnaker-branch}'
83 name: 'k8-calico-spinnaker-{distro}-{installer-type}-{cloud}-{type}-{ci-loop}-{spinnaker-branch}'
85 project-type: multijob
87 disabled: '{obj:disabled}'
94 branch: '{nordix-branch}'
95 - nordix-gerrit-parameters
98 default: '{slave-label}'
99 description: 'Slave label to schedule this job on. All slaves have Ubuntu1604 no matter what distro target nodes use'
101 name: PROVISIONER_TYPE
103 description: 'Provisioner to use for provisioning nodes'
107 description: 'Installer to use for deploying the scenario'
109 name: DEPLOY_SCENARIO
110 default: 'k8-calico-spinnaker'
111 description: 'Scenario to deploy and test'
115 description: 'Type of the deployment'
119 description: 'Distribution to use for configuring target nodes (networking etc.)'
121 name: OPENSTACK_CLOUD_PROVIDER
123 description: 'Name of the cloud where this job is run'
125 name: SPINNAKER_VERSION
126 default: '{spinnaker-branch}'
127 description: 'Spinnaker version to deploy'
130 default: 'nordix-cicd-{deploy-scenario}-{spinnaker-branch}'
132 name: HEAT_ENVIRONMENT_FILENAME
133 default: "heat-environment-full.yaml"
134 description: 'Heat environment file to use for creating the stack'
137 default: '{engine-version}'
138 description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying Spinnaker. Could be sha, branch'
141 default: '{engine-refspec}'
142 description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying Spinnaker. Must be refspec.'
144 name: DEPLOY_SCENARIO_VERSION
145 default: '{deploy-scenario-version}'
146 description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying Spinnaker. Depends on DEPLOY_SCENARIO_REFSPEC and could be sha, branch.'
148 name: DEPLOY_SCENARIO_REFSPEC
149 default: '{deploy-scenario-refspec}'
150 description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying Spinnaker. Depends on DEPLOY_SCENARIO_VERSION and must be refspec.'
153 default: '{pod-name}'
154 description: 'Development purposes only! Set to none for disabling test results DB reporting.'
157 default: '{delete-stack}'
158 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!'
163 use-build-blocker: true
165 - 'cloud-infra-periodic-engine-.*'
175 - credentials-binding:
177 credential-id: '{openrc-credentials-file}'
178 variable: OPENRC_FILE
182 - fix-workspace-permissions
187 - timed: '{daily-trigger}'
191 ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
192 branch: '{nordix-branch}'
198 - description-setter:
199 description: $DEPLOY_SCENARIO | Spinnaker $SPINNAKER_VERSION
202 /bin/rm -rf /tmp/openrc && /bin/cp -f $OPENRC_FILE /tmp/openrc
204 name: Deploy Spinnaker using Helm
207 - name: 'spinnaker-deploy-{distro}-{installer-type}-{type}-{ci-loop}-{spinnaker-branch}'
208 current-parameters: false
209 predefined-parameters: |
211 OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
212 DEPLOY_TYPE=$DEPLOY_TYPE
213 PROVISIONER_TYPE=$PROVISIONER_TYPE
214 INSTALLER_TYPE=$INSTALLER_TYPE
215 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
216 SPINNAKER_VERSION=$SPINNAKER_VERSION
218 STACK_NAME=$STACK_NAME
219 HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
220 ENGINE_VERSION=$ENGINE_VERSION
221 ENGINE_REFSPEC=$ENGINE_REFSPEC
222 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
223 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
225 node-parameters: true
229 name: Test Spinnaker Deployment (not activated)
232 - name: 'spinnaker-test-{distro}-{installer-type}-{type}-{ci-loop}-{spinnaker-branch}'
233 current-parameters: false
234 predefined-parameters: |
236 OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
237 DEPLOY_TYPE=$DEPLOY_TYPE
238 PROVISIONER_TYPE=$PROVISIONER_TYPE
239 INSTALLER_TYPE=$INSTALLER_TYPE
240 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
241 SPINNAKER_VERSION=$SPINNAKER_VERSION
243 STACK_NAME=$STACK_NAME
244 HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
245 ENGINE_VERSION=$ENGINE_VERSION
246 ENGINE_REFSPEC=$ENGINE_REFSPEC
247 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
248 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
250 node-parameters: true
254 name: Promote Spinnaker (not activated)
257 - name: 'promote-spinnaker-{distro}-{installer-type}-{type}-{ci-loop}-{spinnaker-branch}'
258 current-parameters: false
259 predefined-parameters: |
261 OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
262 DEPLOY_TYPE=$DEPLOY_TYPE
263 PROVISIONER_TYPE=$PROVISIONER_TYPE
264 INSTALLER_TYPE=$INSTALLER_TYPE
265 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
266 SPINNAKER_VERSION=$SPINNAKER_VERSION
268 STACK_NAME=$STACK_NAME
269 HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
270 ENGINE_VERSION=$ENGINE_VERSION
271 ENGINE_REFSPEC=$ENGINE_REFSPEC
272 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
273 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
275 node-parameters: true
291 !include-raw-escape: ./wait-for-pkg-manager.sh
293 !include-raw: ./delete-heat-stack.sh
296 name: '{phase}-{distro}-{installer-type}-{type}-{ci-loop}-{spinnaker-branch}'
306 - project-parameters:
308 branch: '{nordix-branch}'
309 - nordix-gerrit-parameters
312 default: 'city-jumphost-ubuntu1804'
313 description: 'Slave label to schedule this job on. All slaves have Ubuntu1604 no matter what distro target nodes use'
315 name: PROVISIONER_TYPE
317 description: 'Provisioner to use for provisioning nodes'
321 description: 'Installer to use for deploying the scenario'
323 name: DEPLOY_SCENARIO
324 default: 'k8-calico-spinnaker'
325 description: 'Scenario to deploy and test'
329 description: 'Type of the deployment'
333 description: 'Distribution to use for configuring target nodes (networking etc.)'
335 name: OPENSTACK_CLOUD_PROVIDER
337 description: 'Name of the cloud where this job is run'
339 name: SPINNAKER_VERSION
340 default: '{spinnaker-branch}'
341 description: 'Spinnaker version to deploy'
344 default: 'nordix-cicd-{deploy-scenario}-{spinnaker-branch}'
346 name: HEAT_ENVIRONMENT_FILENAME
347 default: "heat-environment-full.yaml"
348 description: 'Heat environment filename to use for creating the stack'
350 name: HEAT_ENVIRONMENT_FILE
351 default: "file://$WORKSPACE/.cache/repos/swconfig/scenarios/$DEPLOY_SCENARIO/$INSTALLER_TYPE/role/$DEPLOY_SCENARIO/files/$HEAT_ENVIRONMENT_FILENAME"
352 description: 'Heat environment file location to use for creating the stack'
355 default: '{engine-version}'
356 description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying Spinnaker. Could be sha, branch'
359 default: '{engine-refspec}'
360 description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying Spinnaker. Must be refspec.'
362 name: DEPLOY_SCENARIO_VERSION
363 default: '{deploy-scenario-version}'
364 description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying Spinnaker. Depends on DEPLOY_SCENARIO_REFSPEC and could be sha, branch.'
366 name: DEPLOY_SCENARIO_REFSPEC
367 default: '{deploy-scenario-refspec}'
368 description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying Spinnaker. Depends on DEPLOY_SCENARIO_VERSION and must be refspec.'
371 default: '{pod-name}'
372 description: 'Development purposes only! Set to none for disabling test results DB reporting.'
375 default: '{delete-stack}'
376 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!'
381 timeout: '{build-timeout}'
382 - fix-workspace-permissions
383 - credentials-binding:
384 - username-password-separated:
385 credential-id: 'nordix-cicd-arm-credentials'
386 username: NORDIX_ARM_USERNAME
387 password: NORDIX_ARM_TOKEN
388 - username-password-separated:
389 credential-id: 'nordix-cicd-harbor-credentials'
390 username: NORDIX_HARBOR_USERNAME
391 password: NORDIX_HARBOR_PASSWORD
395 ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
396 branch: '{nordix-branch}'
402 - description-setter:
403 description: $DEPLOY_SCENARIO | Spinnaker $SPINNAKER_VERSION | $OPENSTACK_CLOUD_PROVIDER
406 # vim: set ts=2 sw=2 expandtab: