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
45 keypair-name: 'keypair-nordix-cicd-{deploy-scenario}-1_16'
58 provisioner-type: heat
59 installer-type: kubespray
70 - 'k8-calico-spinnaker-{distro}-{installer-type}-{cloud}-{type}-{ci-loop}-{spinnaker-branch}'
71 - '{phase}-{distro}-{installer-type}-{type}-{ci-loop}-{spinnaker-branch}'
74 name: 'k8-calico-spinnaker-{distro}-{installer-type}-{cloud}-{type}-{ci-loop}-{spinnaker-branch}'
76 project-type: multijob
78 disabled: '{obj:disabled}'
85 branch: '{nordix-branch}'
86 - nordix-gerrit-parameters
89 default: '{slave-label}'
90 description: 'Slave label to schedule this job on. All slaves have Ubuntu1604 no matter what distro target nodes use'
92 name: PROVISIONER_TYPE
94 description: 'Provisioner to use for provisioning nodes'
98 description: 'Installer to use for deploying the scenario'
100 name: DEPLOY_SCENARIO
101 default: 'k8-calico-spinnaker'
102 description: 'Scenario to deploy and test'
106 description: 'Type of the deployment'
110 description: 'Distribution to use for configuring target nodes (networking etc.)'
112 name: OPENSTACK_CLOUD_PROVIDER
114 description: 'Name of the cloud where this job is run'
116 name: SPINNAKER_VERSION
117 default: '{spinnaker-branch}'
118 description: 'Spinnaker version to deploy'
121 default: 'nordix-cicd-{deploy-scenario}-{spinnaker-branch}'
124 default: '{keypair-name}'
126 name: HEAT_ENVIRONMENT_FILENAME
127 default: "heat-environment-full.yaml"
128 description: 'Heat environment file to use for creating the stack'
131 default: '{engine-version}'
132 description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying Spinnaker. Could be sha, branch'
135 default: '{engine-refspec}'
136 description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying Spinnaker. Must be refspec.'
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.'
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.'
147 default: '{pod-name}'
148 description: 'Development purposes only! Set to none for disabling test results DB reporting.'
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!'
157 use-build-blocker: true
159 - 'cloud-infra-verify-engine-.*'
160 - 'cloud-infra-verify-scenario-.*'
161 - 'cloud-infra-periodic-engine-.*'
173 - credentials-binding:
175 credential-id: '{openrc-credentials-file}'
176 variable: OPENRC_FILE
180 - fix-workspace-permissions
185 - timed: '{daily-trigger}'
189 ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
190 branch: '{nordix-branch}'
196 - description-setter:
197 description: $DEPLOY_SCENARIO | Spinnaker $SPINNAKER_VERSION
200 /bin/rm -rf /tmp/openrc && /bin/cp -f $OPENRC_FILE /tmp/openrc
202 name: Deploy Spinnaker using Helm
205 - name: 'spinnaker-deploy-{distro}-{installer-type}-{type}-{ci-loop}-{spinnaker-branch}'
206 current-parameters: false
207 predefined-parameters: |
209 OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
210 DEPLOY_TYPE=$DEPLOY_TYPE
211 PROVISIONER_TYPE=$PROVISIONER_TYPE
212 INSTALLER_TYPE=$INSTALLER_TYPE
213 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
214 SPINNAKER_VERSION=$SPINNAKER_VERSION
216 STACK_NAME=$STACK_NAME
217 HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
218 ENGINE_VERSION=$ENGINE_VERSION
219 ENGINE_REFSPEC=$ENGINE_REFSPEC
220 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
221 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
223 node-parameters: true
227 name: Test Spinnaker Deployment (not activated)
230 - name: 'spinnaker-test-{distro}-{installer-type}-{type}-{ci-loop}-{spinnaker-branch}'
231 current-parameters: false
232 predefined-parameters: |
234 OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
235 DEPLOY_TYPE=$DEPLOY_TYPE
236 PROVISIONER_TYPE=$PROVISIONER_TYPE
237 INSTALLER_TYPE=$INSTALLER_TYPE
238 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
239 SPINNAKER_VERSION=$SPINNAKER_VERSION
241 STACK_NAME=$STACK_NAME
242 HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
243 ENGINE_VERSION=$ENGINE_VERSION
244 ENGINE_REFSPEC=$ENGINE_REFSPEC
245 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
246 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
248 node-parameters: true
252 name: Promote Spinnaker (not activated)
255 - name: 'promote-spinnaker-{distro}-{installer-type}-{type}-{ci-loop}-{spinnaker-branch}'
256 current-parameters: false
257 predefined-parameters: |
259 OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
260 DEPLOY_TYPE=$DEPLOY_TYPE
261 PROVISIONER_TYPE=$PROVISIONER_TYPE
262 INSTALLER_TYPE=$INSTALLER_TYPE
263 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
264 SPINNAKER_VERSION=$SPINNAKER_VERSION
266 STACK_NAME=$STACK_NAME
267 HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
268 ENGINE_VERSION=$ENGINE_VERSION
269 ENGINE_REFSPEC=$ENGINE_REFSPEC
270 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
271 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
273 node-parameters: true
289 !include-raw-escape: ./wait-for-pkg-manager.sh
291 !include-raw: ./delete-heat-stack.sh
294 name: '{phase}-{distro}-{installer-type}-{type}-{ci-loop}-{spinnaker-branch}'
304 - project-parameters:
306 branch: '{nordix-branch}'
307 - nordix-gerrit-parameters
310 default: 'city-jumphost-ubuntu1804'
311 description: 'Slave label to schedule this job on. All slaves have Ubuntu1604 no matter what distro target nodes use'
313 name: PROVISIONER_TYPE
315 description: 'Provisioner to use for provisioning nodes'
319 description: 'Installer to use for deploying the scenario'
321 name: DEPLOY_SCENARIO
322 default: 'k8-calico-spinnaker'
323 description: 'Scenario to deploy and test'
327 description: 'Type of the deployment'
331 description: 'Distribution to use for configuring target nodes (networking etc.)'
333 name: OPENSTACK_CLOUD_PROVIDER
335 description: 'Name of the cloud where this job is run'
337 name: SPINNAKER_VERSION
338 default: '{spinnaker-branch}'
339 description: 'Spinnaker version to deploy'
342 default: 'nordix-cicd-{deploy-scenario}-{spinnaker-branch}'
344 name: HEAT_ENVIRONMENT_FILENAME
345 default: "heat-environment-full.yaml"
346 description: 'Heat environment filename to use for creating the stack'
348 name: HEAT_ENVIRONMENT_FILE
349 default: "file:///opt/engine/.cache/repos/swconfig/scenarios/$DEPLOY_SCENARIO/$INSTALLER_TYPE/role/$DEPLOY_SCENARIO/files/$HEAT_ENVIRONMENT_FILENAME"
350 description: 'Heat environment file location to use for creating the stack'
353 default: '{engine-version}'
354 description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying Spinnaker. Could be sha, branch'
357 default: '{engine-refspec}'
358 description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying Spinnaker. Must be refspec.'
360 name: DEPLOY_SCENARIO_VERSION
361 default: '{deploy-scenario-version}'
362 description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying Spinnaker. Depends on DEPLOY_SCENARIO_REFSPEC and could be sha, branch.'
364 name: DEPLOY_SCENARIO_REFSPEC
365 default: '{deploy-scenario-refspec}'
366 description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying Spinnaker. Depends on DEPLOY_SCENARIO_VERSION and must be refspec.'
369 default: '{pod-name}'
370 description: 'Development purposes only! Set to none for disabling test results DB reporting.'
373 default: '{delete-stack}'
374 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!'
379 timeout: '{build-timeout}'
380 - fix-workspace-permissions
381 - credentials-binding:
382 - username-password-separated:
383 credential-id: 'nordix-cicd-arm-credentials'
384 username: NORDIX_ARM_USERNAME
385 password: NORDIX_ARM_TOKEN
386 - username-password-separated:
387 credential-id: 'nordix-cicd-harbor-credentials'
388 username: NORDIX_HARBOR_USERNAME
389 password: NORDIX_HARBOR_PASSWORD
393 ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
394 branch: '{nordix-branch}'
400 - description-setter:
401 description: $DEPLOY_SCENARIO | Spinnaker $SPINNAKER_VERSION | $OPENSTACK_CLOUD_PROVIDER
404 # vim: set ts=2 sw=2 expandtab: