fix wrong parameters for git step
qrtt1 opened this issue · comments
Ching Yi, Chan commented
- the build.groovy is using the old repo
- branch not set into git step
Ching Yi, Chan commented
the original code is:
git url: 'https://qrtt1@bitbucket.org/qrtt1/jenkinskata.git'
branch: 'master'
the sample code is a demo for "branch" parameter:
def call(m = [:]) {
println m
}
call url: "url"
branch: "branch"
println "another statement"
the output is:
$ groovy magic.groovy
[url:url]
another statement
the branch
is not set, because we lose the "," for map syntax.
here is the patched code will show the correct output:
--- magic.groovy 2016-10-15 22:55:09.000000000 +0800
+++ correct.groovy 2016-10-15 23:06:54.000000000 +0800
@@ -3,6 +3,6 @@
println m
}
-call url: "url"
+call url: "url",
branch: "branch"
println "another statement"