diff --git a/Jenkinsfile b/Jenkinsfile index 0b7b83a..821aa1a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -75,9 +75,9 @@ """) } -def gitPush(gitRemote = 'origin', gitCommit) { - def dryRun = ( env.DRYRUN == 'true' ) ? '--dry-run' : '' - sh("git push ${dryRun} ${gitRemote} ${gitCommit}") +def gitPush(gitRemote, gitCommit, gitOpts = "") { + gitOpts = ( env.DRYRUN == 'true' ) ? "--dry-run ${gitOpts}" : gitOpts + sh("git push ${gitOpts} ${gitRemote} ${gitCommit}") } def gitLog(bottom = null, top = 'HEAD') { @@ -197,7 +197,7 @@ withGitPassword('bot-ci-dgm', { // Fork a release branch as requested echo("Git logs since last tag:\n" + gitLog()) - sh("git checkout -B release-${env.LAZY_INPUT}") + sh("git checkout -b release-${env.LAZY_INPUT}") gitUpdateVersion(env.LAZY_INPUT, currentVersion.code + 1) def nextVersion = [ name: getVersion('versionName') as String, code: getVersion('versionCode') as Integer ] echo("nextVersion = ${nextVersion.toString()}" )