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-periodic-engine-.*'
169 - credentials-binding:
171 credential-id: '{openrc-credentials-file}'
172 variable: OPENRC_FILE
176 - fix-workspace-permissions
181 - timed: '{daily-trigger}'
185 ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
186 branch: '{nordix-branch}'
192 - description-setter:
193 description: $DEPLOY_SCENARIO | Spinnaker $SPINNAKER_VERSION
196 /bin/rm -rf /tmp/openrc && /bin/cp -f $OPENRC_FILE /tmp/openrc
198 name: Deploy Spinnaker using Helm
201 - name: 'spinnaker-deploy-{distro}-{installer-type}-{type}-{ci-loop}-{spinnaker-branch}'
202 current-parameters: false
203 predefined-parameters: |
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
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
219 node-parameters: true
223 name: Test Spinnaker Deployment (not activated)
226 - name: 'spinnaker-test-{distro}-{installer-type}-{type}-{ci-loop}-{spinnaker-branch}'
227 current-parameters: false
228 predefined-parameters: |
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
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
244 node-parameters: true
248 name: Promote Spinnaker (not activated)
251 - name: 'promote-spinnaker-{distro}-{installer-type}-{type}-{ci-loop}-{spinnaker-branch}'
252 current-parameters: false
253 predefined-parameters: |
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
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
269 node-parameters: true
285 !include-raw-escape: ./wait-for-pkg-manager.sh
287 !include-raw: ./delete-heat-stack.sh
290 name: '{phase}-{distro}-{installer-type}-{type}-{ci-loop}-{spinnaker-branch}'
300 - project-parameters:
302 branch: '{nordix-branch}'
303 - nordix-gerrit-parameters
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'
309 name: PROVISIONER_TYPE
311 description: 'Provisioner to use for provisioning nodes'
315 description: 'Installer to use for deploying the scenario'
317 name: DEPLOY_SCENARIO
318 default: 'k8-calico-spinnaker'
319 description: 'Scenario to deploy and test'
323 description: 'Type of the deployment'
327 description: 'Distribution to use for configuring target nodes (networking etc.)'
329 name: OPENSTACK_CLOUD_PROVIDER
331 description: 'Name of the cloud where this job is run'
333 name: SPINNAKER_VERSION
334 default: '{spinnaker-branch}'
335 description: 'Spinnaker version to deploy'
338 default: 'nordix-cicd-{deploy-scenario}-{spinnaker-branch}'
340 name: HEAT_ENVIRONMENT_FILENAME
341 default: "heat-environment-full.yaml"
342 description: 'Heat environment filename to use for creating the stack'
344 name: HEAT_ENVIRONMENT_FILE
345 default: "file:///opt/engine/.cache/repos/swconfig/scenarios/$DEPLOY_SCENARIO/$INSTALLER_TYPE/role/$DEPLOY_SCENARIO/files/$HEAT_ENVIRONMENT_FILENAME"
346 description: 'Heat environment file location to use for creating the stack'
349 default: '{engine-version}'
350 description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying Spinnaker. Could be sha, branch'
353 default: '{engine-refspec}'
354 description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying Spinnaker. Must be refspec.'
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.'
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.'
365 default: '{pod-name}'
366 description: 'Development purposes only! Set to none for disabling test results DB reporting.'
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!'
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
389 ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
390 branch: '{nordix-branch}'
396 - description-setter:
397 description: $DEPLOY_SCENARIO | Spinnaker $SPINNAKER_VERSION | $OPENSTACK_CLOUD_PROVIDER
400 # vim: set ts=2 sw=2 expandtab: