[JIRA] (JENKINS-39558) git localBranch option does not work for empty string or "**"
Title: Message Title Daniel Spilker closed an issue as Fixed Jenkins / JENKINS-39558 git localBranch option does not work for empty string or "**" Change By: Daniel Spilker Status: Resolved Closed Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-39558) git localBranch option does not work for empty string or "**"
Title: Message Title SCM/JIRA link daemon commented on JENKINS-39558 Re: git localBranch option does not work for empty string or "**" Code changed in jenkins User: Daniel Spilker Path: docs/Home.md job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/scm/GitExtensionContext.groovy job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/helpers/ScmContextSpec.groovy http://jenkins-ci.org/commit/job-dsl-plugin/a83360fb3b9789962177f40c027194e27b79d311 Log: made branch parameter for localBranch optional [FIXES JENKINS-39558] Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-39558) git localBranch option does not work for empty string or "**"
Title: Message Title SCM/JIRA link daemon resolved as Fixed Jenkins / JENKINS-39558 git localBranch option does not work for empty string or "**" Change By: SCM/JIRA link daemon Status: Open Resolved Resolution: Fixed Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-39558) git localBranch option does not work for empty string or "**"
Title: Message Title SCM/JIRA link daemon commented on JENKINS-39558 Re: git localBranch option does not work for empty string or "**" Code changed in jenkins User: Daniel Spilker Path: docs/Home.md job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/scm/GitExtensionContext.groovy job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/helpers/ScmContextSpec.groovy http://jenkins-ci.org/commit/job-dsl-plugin/1c7ed444c4d65df3b07213ba4a28c35c109dcbe9 Log: Merge pull request #947 from daspilker/JENKINS-39558 JENKINS-39558 made branch parameter for localBranch optional Compare: https://github.com/jenkinsci/job-dsl-plugin/compare/b999193bf562...1c7ed444c4d6 Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-39558) git localBranch option does not work for empty string or "**"
Title: Message Title Sven Ackermann commented on JENKINS-39558 Re: git localBranch option does not work for empty string or "**" I think the feature in Git plugin is really not that stable. Sometimes it works, sometimes not. I think I found out that when the merge is a fast forward, it checks out to a local branch matching the source branch of the merge ("feature/XXX"), but if it really adds a merge commit the local branch matches the target ("develop"). This makes sense in a particular way, but it is not desired. Of course, I always want it to be the the source branch, but I also understand that the target might be correct, too. I think, it should at least do always the same thing. But anyway, this is more a problem of the Git plugin, so I might report an issue there. I think the only thing to be fixed in DSL plugin is the use of the empty string (or null?) which should not add an empty sub-element "". Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-39558) git localBranch option does not work for empty string or "**"
Title: Message Title Daniel Spilker commented on JENKINS-39558 Re: git localBranch option does not work for empty string or "**" I can't reproduce this with "**". Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-39558) git localBranch option does not work for empty string or "**"
Title: Message Title Daniel Spilker commented on JENKINS-39558 Re: git localBranch option does not work for empty string or "**" This feature was added in Git plugin 2.4.3 (see JENKINS-33202). Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-39558) git localBranch option does not work for empty string or "**"
Title: Message Title Daniel Spilker updated an issue Jenkins / JENKINS-39558 git localBranch option does not work for empty string or "**" Change By: Daniel Spilker Issue Type: Bug Improvement Priority: Critical Minor Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-39558) git localBranch option does not work for empty string or "**"
Title: Message Title Sven Ackermann updated an issue Jenkins / JENKINS-39558 git localBranch option does not work for empty string or "**" Change By: Sven Ackermann When using the localBranch option for git in DSL plugin with value "**" or "" (see documentation of "Check out to specific local branch" option in the Job configuration) together with mergeOptions, the build throws an exception:{code:java}Merging Revision 43bd25e24c777330f07948e96672e006009e72d6 (origin/feature/myFeature) to origin/develop, UserMergeOptions{mergeRemote='origin', mergeTarget='develop', mergeStrategy='default', fastForwardMode='--ff'}14:13:49 > git rev-parse origin/develop^{commit} # timeout=1014:13:49 > git config core.sparsecheckout # timeout=1014:13:49 > git checkout -f origin/develop # timeout=1014:13:49 > git branch -a -v --no-abbrev # timeout=1014:13:49 > git checkout -b ** origin/develop14:13:49 FATAL: Could not checkout ** with start point origin/develop14:13:49 hudson.plugins.git.GitException: Could not checkout ** with start point origin/develop14:13:49 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:2003)14:13:49 at hudson.plugins.git.extensions.impl.PreBuildMerge.decorateRevisionToBuild(PreBuildMerge.java:70)14:13:49 at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:998)14:13:49 at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1087)14:13:49 at hudson.scm.SCM.checkout(SCM.java:495)14:13:49 at hudson.model.AbstractProject.checkout(AbstractProject.java:1269)14:13:49 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)14:13:49 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)14:13:49 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)14:13:49 at hudson.model.Run.execute(Run.java:1741)14:13:49 at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)14:13:49 at hudson.model.ResourceController.execute(ResourceController.java:98)14:13:49 at hudson.model.Executor.run(Executor.java:410)14:13:49 Caused by: hudson.plugins.git.GitException: Command "git checkout -b ** origin/develop" returned status code 128:14:13:49 stdout: 14:13:49 stderr: fatal: ' ** ' is no valid branch name.14:13:49 14:13:49 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1723)14:13:49 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:63)14:13:49 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:1997)14:13:49 ... 12 more{code}script:{code}mavenJob("myJob") { scm {git { branch('origin/feature/*') remote {name('origin')url('ssh://git@mygitserver/myRepo') } extensions {cleanBeforeCheckout()pruneBranches()localBranch(' ** ')mergeOptions { remote('origin') branch('develop')} }} }}{code}The XML generated by Job DSL plugin looks like this:{code:xml}... **
[JIRA] (JENKINS-39558) git localBranch option does not work for empty string or "**"
Title: Message Title Sven Ackermann created an issue Jenkins / JENKINS-39558 git localBranch option does not work for empty string or "**" Issue Type: Bug Assignee: Daniel Spilker Components: job-dsl-plugin Created: 2016/Nov/07 3:08 PM Environment: OS: Linux amd64 JRE: openjdk.x86_64 1.7.0 u55 Jenkins 2.7.4 Job DSL 1.49 Git Plugin 2.5.2 no slaves Priority: Critical Reporter: Sven Ackermann When using the localBranch option for git in DSL plugin with value "**" or "" (see documentation of "Check out to specific local branch" option in the Job configuration) together with mergeOptions, the build throws an exception: Merging Revision 43bd25e24c777330f07948e96672e006009e72d6 (origin/feature/myFeature) to origin/develop, UserMergeOptions{mergeRemote='origin', mergeTarget='develop', mergeStrategy='default', fastForwardMode='--ff'} 14:13:49 > git rev-parse origin/develop^{commit} # timeout=10 14:13:49 > git config core.sparsecheckout # timeout=10 14:13:49 > git checkout -f origin/develop # timeout=10 14:13:49 > git branch -a -v --no-abbrev # timeout=10 14:13:49 > git checkout -b ** origin/develop 14:13:49 FATAL: Could not checkout ** with start point origin/develop 14:13:49 hudson.plugins.git.GitException: Could not checkout ** with start point origin/develop 14:13:49 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:2003) 14:13:49 at hudson.plugins.git.extensions.impl.PreBuildMerge.decorateRevisionToBuild(PreBuildMerge.java:70) 14:13:49 at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:998) 14:13:49 at