From d293bfaac0daf25ff7d85e19b6fee6e36f74f9a1 Mon Sep 17 00:00:00 2001 From: Fatih Degirmenci Date: Mon, 26 Aug 2019 13:30:14 +0000 Subject: [PATCH] Move ONAP pipelines to EST Tenant and enable keeping the stack This change moves ONAP pipelines to City EST Tenant. Apart from that, it introduces a new parameter, DELETE_STACK, so the users of Jenkins can opt to keep the stack upon completion of the job for troubleshooting purposes. Default is to delete the stack. No matter what, the stack will be deleted and recreated when the same job gets triggered manually or on timer so the users need to finish their jobs on the stack on time or they will be deleted. Change-Id: I483c2b2723fae9a606342a38749f820dd9c7518d --- jjb/cloud-infra/cloud-infra-periodic-onap.yaml | 13 ++++++++++--- jjb/cloud-infra/delete-heat-stack.sh | 7 +++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/jjb/cloud-infra/cloud-infra-periodic-onap.yaml b/jjb/cloud-infra/cloud-infra-periodic-onap.yaml index bdb63dfa..488dc817 100644 --- a/jjb/cloud-infra/cloud-infra-periodic-onap.yaml +++ b/jjb/cloud-infra/cloud-infra-periodic-onap.yaml @@ -138,6 +138,13 @@ name: POD_NAME default: '{pod-name}' description: 'Development purposes only! Set to none for disabling test results DB reporting.' + - choice: + name: DELETE_STACK + choices: + - 'yes' + - 'no' + default: 'yes' + description: 'Development purposes only! Whether delete the stack or not. Default is yes. Setting this to no will increase the cost!' properties: - logrotate @@ -156,7 +163,7 @@ wrappers: - credentials-binding: - file: - credential-id: nordix-jenkins-openrcfile-city-frankfurt-defaultproject + credential-id: est-jenkins-openrcfile-city-karlskrona-onap variable: OPENRC_FILE - mask-passwords - build-timeout: @@ -403,7 +410,7 @@ wrappers: - credentials-binding: - file: - credential-id: nordix-jenkins-openrcfile-city-frankfurt-defaultproject + credential-id: est-jenkins-openrcfile-city-karlskrona-onap variable: OPENRC_FILE - mask-passwords - build-timeout: @@ -467,7 +474,7 @@ wrappers: - credentials-binding: - file: - credential-id: nordix-jenkins-openrcfile-city-frankfurt-defaultproject + credential-id: est-jenkins-openrcfile-city-karlskrona-onap variable: OPENRC_FILE - mask-passwords - build-timeout: diff --git a/jjb/cloud-infra/delete-heat-stack.sh b/jjb/cloud-infra/delete-heat-stack.sh index 7c6ecdb4..aa3478d4 100644 --- a/jjb/cloud-infra/delete-heat-stack.sh +++ b/jjb/cloud-infra/delete-heat-stack.sh @@ -21,6 +21,13 @@ set -o errexit set -o nounset +if [[ "$DELETE_STACK" != "yes" ]]; then + echo "-------------------------------------------------------------------------" + echo "Info: Stack will not be deleted upon the completion of the job!" + echo "-------------------------------------------------------------------------" + exit 0 +fi + echo echo echo "-------------------------------------------------------------------------" -- 2.25.1