1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-03-03 15:02:35 +02:00

Fix issue with removed parameter --stepName (#1007)

This commit is contained in:
Oliver Nocon 2019-11-25 08:58:16 +01:00 committed by GitHub
parent 8e29b70ea2
commit 2aa34c7a3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,7 @@ class GithubPublishReleaseTest extends BasePiperTest {
return closure()
})
credentialsRule.withCredentials('githubTokenId', 'thisIsATestToken')
shellCallRule.setReturnValue('./piper getConfig --contextConfig --stepMetadata \'metadata/githubrelease.yaml\' --stepName githubPublishRelease', '{"githubTokenCredentialsId":"githubTokenId"}')
shellCallRule.setReturnValue('./piper getConfig --contextConfig --stepMetadata \'metadata/githubrelease.yaml\'', '{"githubTokenCredentialsId":"githubTokenId"}')
}
@Test

View File

@ -33,7 +33,7 @@ void call(Map parameters = [:]) {
"PIPER_version=${script.commonPipelineEnvironment.getArtifactVersion()?:''}"
]) {
// get context configuration
config = readJSON (text: sh(returnStdout: true, script: "./piper getConfig --contextConfig --stepMetadata '${METADATA_FILE}' --stepName ${STEP_NAME}"))
config = readJSON (text: sh(returnStdout: true, script: "./piper getConfig --contextConfig --stepMetadata '${METADATA_FILE}'"))
// execute step
withCredentials([string(credentialsId: config.githubTokenCredentialsId, variable: 'TOKEN')]) {