From be1d97cb5af40c3c2728b395eee19563e6ed1aaf Mon Sep 17 00:00:00 2001 From: Oliver Nocon Date: Wed, 15 Aug 2018 09:46:08 +0200 Subject: [PATCH] cloudFoundryDeploy - update stshing behavior adapt stashing behavior according to #230 --- resources/default_pipeline_environment.yml | 4 +++- vars/cloudFoundryDeploy.groovy | 5 ++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/resources/default_pipeline_environment.yml b/resources/default_pipeline_environment.yml index 279a80318..b5d141bb1 100644 --- a/resources/default_pipeline_environment.yml +++ b/resources/default_pipeline_environment.yml @@ -111,7 +111,9 @@ steps: mtaPath: '' smokeTestScript: 'blueGreenCheckScript.sh' smokeTestStatusCode: 200 - stashContent: [] + stashContent: + - 'deployDescriptor' + - 'pipelineConfigAndTests' cf_native: dockerImage: 's4sdk/docker-cf-cli' dockerWorkspace: '/home/piper' diff --git a/vars/cloudFoundryDeploy.groovy b/vars/cloudFoundryDeploy.groovy index e6a9eb6ad..811f13dd0 100644 --- a/vars/cloudFoundryDeploy.groovy +++ b/vars/cloudFoundryDeploy.groovy @@ -50,7 +50,7 @@ def call(Map parameters = [:]) { echo "[${STEP_NAME}] General parameters: deployTool=${config.deployTool}, deployType=${config.deployType}, cfApiEndpoint=${config.cloudFoundry.apiEndpoint}, cfOrg=${config.cloudFoundry.org}, cfSpace=${config.cloudFoundry.space}, cfCredentialsId=${config.cloudFoundry.credentialsId}, deployUser=${config.deployUser}" - utils.unstash 'deployDescriptor' + config.stashContent = utils.unstashAll(config.stashContent) if (config.deployTool == 'mtaDeployPlugin') { // set default mtar path @@ -69,9 +69,8 @@ def call(Map parameters = [:]) { if (config.smokeTestScript == 'blueGreenCheckScript.sh') { writeFile file: config.smokeTestScript, text: libraryResource(config.smokeTestScript) - } else { - utils.unstash 'pipelineConfigAndTests' } + config.smokeTest = '--smoke-test $(pwd)/' + config.smokeTestScript sh "chmod +x ${config.smokeTestScript}"