1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-14 11:03:09 +02:00

Fix the syntax error in artifactSetVersion step (#127)

* Update artifactSetVersion.groovy
* Fix tests for artifactSetVersion
This commit is contained in:
Ramachandra Kamath Arbettu 2018-03-28 21:38:30 +02:00 committed by Oliver Nocon
parent c8fdbcf263
commit aa681dd166
2 changed files with 2 additions and 2 deletions

View File

@ -98,7 +98,7 @@ class ArtifactSetVersionTest extends BasePipelineTest {
void testVersioningCustomGitUserAndEMail() {
jsr.step.call(script: [commonPipelineEnvironment: jer.env], juStabGitUtils: gitUtils, buildTool: 'maven', gitSshUrl: 'myGitSshUrl', gitUserEMail: 'test@test.com', gitUserName: 'test')
assertEquals ('git -c user.email="test@test.com" -c user.name "test" commit -m \'update version 1.2.3-20180101010203_testCommitId\'', jscr.shell[7])
assertEquals ('git -c user.email="test@test.com" -c user.name="test" commit -m \'update version 1.2.3-20180101010203_testCommitId\'', jscr.shell[7])
}
@Test

View File

@ -88,7 +88,7 @@ def call(Map parameters = [:]) {
sshagent([configuration.gitCredentialsId]) {
def gitUserMailConfig = ''
if (configuration.gitUserName && configuration.gitUserEMail)
gitUserMailConfig = "-c user.email=\"${configuration.gitUserEMail}\" -c user.name \"${configuration.gitUserName}\""
gitUserMailConfig = "-c user.email=\"${configuration.gitUserEMail}\" -c user.name=\"${configuration.gitUserName}\""
try {
sh "git ${gitUserMailConfig} commit -m 'update version ${newVersion}'"