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:
parent
c8fdbcf263
commit
aa681dd166
@ -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
|
||||
|
@ -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}'"
|
||||
|
Loading…
Reference in New Issue
Block a user