[JIRA] (JENKINS-53083) Clone/checkout with merge before build does not behave/work (as expected)

2018-08-17 Thread mark.earl.wa...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Mark Waite commented on  JENKINS-53083  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Clone/checkout with merge before build does not behave/work (as expected)   
 

  
 
 
 
 

 
 The workaround seems reasonable to me.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)  
 

  
 

   





-- 
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-53083) Clone/checkout with merge before build does not behave/work (as expected)

2018-08-17 Thread mark.earl.wa...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Mark Waite assigned an issue to Unassigned  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-53083  
 
 
  Clone/checkout with merge before build does not behave/work (as expected)   
 

  
 
 
 
 

 
Change By: 
 Mark Waite  
 
 
Assignee: 
 Mark Waite  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)  
 

  
 

   





-- 
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-53083) Clone/checkout with merge before build does not behave/work (as expected)

2018-08-17 Thread daan.tim...@philips.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Daan Timmer edited a comment on  JENKINS-53083  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Clone/checkout with merge before build does not behave/work (as expected)   
 

  
 
 
 
 

 
 I am working around this issue by not merging before build and just doing it myself:{code: java groovy }stage('test-merge'){ bat "git checkout ${branchTo}" bat "git merge --ff-only -"}{code}and : /or {code: java groovy }stage('merge'){ bat "git checkout ${branchTo}" bat "git merge --ff-only -" bat "git push" }{code}  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)  
 

  
 

   





-- 
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-53083) Clone/checkout with merge before build does not behave/work (as expected)

2018-08-17 Thread daan.tim...@philips.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Daan Timmer commented on  JENKINS-53083  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Clone/checkout with merge before build does not behave/work (as expected)   
 

  
 
 
 
 

 
 I am working around this issue by not merging before build and just doing it myself: 

 

stage('test-merge')
{
 bat "git checkout ${branchTo}"
 bat "git merge --ff-only -"
} 

 and: 

 

stage('merge')
{
 bat "git checkout ${branchTo}"
 bat "git merge --ff-only -"
 bat "git push" 
}
 

  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)  
 

  
 

   





-- 
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-53083) Clone/checkout with merge before build does not behave/work (as expected)

2018-08-17 Thread daan.tim...@philips.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Daan Timmer updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-53083  
 
 
  Clone/checkout with merge before build does not behave/work (as expected)   
 

  
 
 
 
 

 
Change By: 
 Daan Timmer  
 

  
 
 
 
 

 
 Description of expected/wanted behaviour: * Build/checkout branch 'specificbranch' * before build merge 'specificbranch' with 'masterbranch' with upstream  stracking  tracking  of 'masterbranch' * when build starts expect workspace to be in a merged version of 'masterbranch' with 'specificbranch'Setup: * pipeline job ** parameters *** repoName: full repository name *** branchRef: full branch ref (ex refs/heads/master)  ** SCM git *** lightweight checkout is disabled  *** repository: ssh://urltoourserver/git/$repoName  name either blank or fixed as 'origin'  no custom refspec *** branches to build: ${branchRef} *** Additional behaviour:  advanced sub-modules behaviours (recursive update)  wipe repository & force clone  Check out to specific local branch (left empty) _(note 1)_  Merge before build * name of repository: origin _(note 2)_ * branch to merge to: stable * merge strategy: default * ff-mode: --ff-onlyObservations:Specifying name of repository of the merge before build option as 'origin' and branch to merge to as 'stable' results in the behaviour that it tries to force checkout 'origin/stable' which results in a 'HEAD detached at origin/stable' situation. And then it'll merge the branch specified by ${branchRef} in to the detached head.After the merge the plugin proceeds to checkout the ${branchRef} using 'checkout -b branchname hashvalue'.  This results in a local branch, which does not track the remote branch and is not the result of the previous merge action.The previous merge action is also not available as it is lost after  the latest checkout action(s)_note 1_: Specifying ** does not work. Will complain that ** is not a valid branch.> git.exe checkout -b ** origin/stable ??hudson.plugins.git.GitException: Command "git.exe checkout -b ** origin/stable" returned status code 128:?? stdout: ??stderr: fatal: '**' is not a valid branch name.?? _note 2_: I have to explicitly give this a value, leaving it blank does _not_ work. It'll default to null??Merging Revision 12d019d59117daa84b4d3d4a570a996c387b5199 (refs/remotes/origin/release/0.1.2) to null/stable, UserMergeOptions\{mergeRemote='null', mergeTarget='stable', mergeStrategy='default', fastForwardMode='--ff-only'}?? ??> git.exe rev-parse "null/stable^\{commit}" # timeout=10?? ??hudson.plugins.git.GitException: Command "git.exe rev-parse "null/stable^\{commit}"" returned status code 128:?? ??stdout: null/stable^\{commit}stderr: fatal: ambiguous argument 'null/stable^\{commit}': unknown revision or path not in the working tree.?? ??Use '--' to separate paths from revisions, like this:?? ??'git  [...] – [...]' at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2016)?? ?? at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1984)?? ?? at 

[JIRA] (JENKINS-53083) Clone/checkout with merge before build does not behave/work (as expected)

2018-08-17 Thread daan.tim...@philips.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Daan Timmer updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-53083  
 
 
  Clone/checkout with merge before build does not behave/work (as expected)   
 

  
 
 
 
 

 
Change By: 
 Daan Timmer  
 

  
 
 
 
 

 
 Description of expected/wanted behaviour: * Build/checkout branch 'specificbranch' * before build merge 'specificbranch' with 'masterbranch' with upstream stracking of 'masterbranch' * when build starts expect workspace to be in a merged version of 'masterbranch' with 'specificbranch'Setup: * pipeline job ** parameters *** repoName: full repository name *** branchRef: full branch ref (ex refs/heads/master)  ** SCM git *** lightweight checkout is disabled  *** repository: ssh://urltoourserver/git/$repoName  name either blank or fixed as 'origin'  no custom refspec *** branches to build: ${branchRef} *** Additional behaviour:  advanced sub-modules behaviours (recursive update)  wipe repository & force clone  Check out to specific local branch (left empty) _(note 1)_  Merge before build * name of repository: origin _(note 2)_ * branch to merge to: stable * merge strategy: default * ff-mode: --ff-onlyObservations:Specifying name of repository of the merge before build option as 'origin' and branch to merge to as 'stable' results in the behaviour that it tries to force checkout 'origin/stable' which results in a 'HEAD detached at origin/stable' situation. And then it'll merge the branch specified by ${branchRef} in to the detached head.After the merge the plugin proceeds to checkout the ${branchRef} using 'checkout -b branchname hashvalue'.  This results in a local branch, which does not track the remote branch and is not the result of the previous merge action.The previous merge action is also not available as it is lost after  the latest checkout action(s)_note 1_: Specifying ** does not work. Will complain that ** is not a valid branch.> git.exe checkout -b ** origin/stable ??hudson.plugins.git.GitException: Command "git.exe checkout -b ** origin/stable" returned status code 128:??stdout: ??stderr: fatal: '**' is not a valid branch name.?? _note 2_: I have to explicitly give this a value, leaving it blank does _not_ work. It'll default to null??Merging Revision 12d019d59117daa84b4d3d4a570a996c387b5199 (refs/remotes/origin/release/0.1.2) to null/stable, UserMergeOptions\{mergeRemote='null', mergeTarget='stable', mergeStrategy='default', fastForwardMode='--ff-only'}?? ??> git.exe rev-parse "null/stable^\{commit}" # timeout=10?? ??hudson.plugins.git.GitException: Command "git.exe rev-parse "null/stable^\{commit}"" returned status code 128:?? ??stdout: null/stable^\{commit}stderr: fatal: ambiguous argument 'null/stable^\{commit}': unknown revision or path not in the working tree.?? ??Use '--' to separate paths from revisions, like this:?? ??'git  [...] – [...]' at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2016)?? ?? at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1984)?? ?? at 

[JIRA] (JENKINS-53083) Clone/checkout with merge before build does not behave/work (as expected)

2018-08-17 Thread daan.tim...@philips.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Daan Timmer updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-53083  
 
 
  Clone/checkout with merge before build does not behave/work (as expected)   
 

  
 
 
 
 

 
Change By: 
 Daan Timmer  
 

  
 
 
 
 

 
 Description of expected/wanted behaviour: * Build/checkout branch 'specificbranch' * before build merge 'specificbranch' with 'masterbranch' with upstream stracking of 'masterbranch' * when build starts expect workspace to be in a merged version of 'masterbranch' with 'specificbranch'Setup: * pipeline job ** parameters *** repoName: full repository name *** branchRef: full branch ref (ex refs/heads/master)  ** SCM git *** lightweight checkout is disabled  *** repository: ssh://urltoourserver/git/$repoName  name either blank or fixed as 'origin'  no custom refspec *** branches to build: ${branchRef} *** Additional behaviour:  advanced sub-modules behaviours (recursive update)  wipe repository & force clone  Check out to specific local branch (left empty) _(note 1)_  Merge before build * name of repository: origin _(note 2)_ * branch to merge to: stable * merge strategy: default * ff-mode: --ff-onlyObservations:Specifying name of repository of the merge before build option as 'origin' and branch to merge to as 'stable' results in the behaviour that it tries to force checkout 'origin/stable' which results in a 'HEAD detached at origin/stable' situation. And then it'll merge the branch specified by ${branchRef} in to the detached head.After the merge the plugin proceeds to checkout the ${branchRef} using 'checkout -b branchname hashvalue'.  This results in a local branch, which does not track the remote branch and is not the result of the previous merge action.The previous merge action is also not available as it is lost after  the latest checkout action(s)_note 1_: Specifying ** does not work. Will complain that ** is not a valid branch. ??  > git.exe checkout -b ** origin/stable ??  ??hudson.plugins.git.GitException: Command "git.exe checkout -b ** origin/stable" returned status code 128:??  ?? stdout:  ??  ??stderr: fatal: '**' is not a valid branch name.?? _note 2_: I have to explicitly give this a value, leaving it blank does _not_ work. It'll default to null??Merging Revision 12d019d59117daa84b4d3d4a570a996c387b5199 (refs/remotes/origin/release/0.1.2) to null/stable, UserMergeOptions\{mergeRemote='null', mergeTarget='stable', mergeStrategy='default', fastForwardMode='--ff-only'}> git.exe rev-parse "null/stable^\{commit}" # timeout=10?? ??hudson.plugins.git.GitException: Command "git.exe rev-parse "null/stable^\{commit}"" returned status code 128:?? ??stdout: null/stable^\{commit}stderr: fatal: ambiguous argument 'null/stable^\{commit}': unknown revision or path not in the working tree.?? ??Use '--' to separate paths from revisions, like this:?? ??'git  [...] – [...]' at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2016) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1984) at 

[JIRA] (JENKINS-53083) Clone/checkout with merge before build does not behave/work (as expected)

2018-08-17 Thread daan.tim...@philips.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Daan Timmer updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-53083  
 
 
  Clone/checkout with merge before build does not behave/work (as expected)   
 

  
 
 
 
 

 
Change By: 
 Daan Timmer  
 

  
 
 
 
 

 
 Description of expected/wanted behaviour: * Build/checkout branch 'specificbranch' * before build merge 'specificbranch' with 'masterbranch' with upstream stracking of 'masterbranch' * when build starts expect workspace to be in a merged version of 'masterbranch' with 'specificbranch'Setup: * pipeline job ** parameters *** repoName: full repository name *** branchRef: full branch ref (ex refs/heads/master)  ** SCM git *** lightweight checkout is disabled  *** repository: ssh://urltoourserver/git/$repoName  name either blank or fixed as 'origin'  no custom refspec *** branches to build: ${branchRef} *** Additional behaviour:  advanced sub-modules behaviours (recursive update)  wipe repository & force clone  Check out to specific local branch (left empty) _(note 1)_  Merge before build * name of repository: origin _(note 2)_ * branch to merge to: stable * merge strategy: default * ff-mode: --ff-onlyObservations:Specifying name of repository of the merge before build option as 'origin' and branch to merge to as 'stable' results in the behaviour that it tries to force checkout 'origin/stable' which results in a 'HEAD detached at origin/stable' situation. And then it'll merge the branch specified by ${branchRef} in to the detached head.After the merge the plugin proceeds to checkout the ${branchRef} using 'checkout -b branchname hashvalue'. This results in a local branch, which does not track the remote branch and is not the result of the previous merge action.The previous merge action is also not available as it is lost after  the latest checkout action(s)_note 1_:Specifying ** does not work. Will complain that ** is not a valid branch.?? > git.exe checkout -b ** origin/stablehudson.plugins.git.GitException: Command "git.exe checkout -b ** origin/stable" returned status code 128:stdout: stderr: fatal: '**' is not a valid branch name.?? _note 2_:I have to explicitly give this a value, leaving it blank does _not_ work. It'll default to null??Merging Revision 12d019d59117daa84b4d3d4a570a996c387b5199 (refs/remotes/origin/release/0.1.2) to null/stable, UserMergeOptions\{mergeRemote='null', mergeTarget='stable', mergeStrategy='default', fastForwardMode='--ff-only'} > git.exe rev-parse "null/stable^\{commit}" # timeout=10hudson.plugins.git.GitException: Command "git.exe rev-parse "null/stable^\{commit}"" returned status code 128:stdout: null/stable^\{commit}stderr: fatal: ambiguous argument 'null/stable^\{commit}': unknown revision or path not in the working tree.Use '--' to separate paths from revisions, like this:'git  [...]  --  –  [...]'   at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2016)    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1984)    at 

[JIRA] (JENKINS-53083) Clone/checkout with merge before build does not behave/work (as expected)

2018-08-17 Thread daan.tim...@philips.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Daan Timmer created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-53083  
 
 
  Clone/checkout with merge before build does not behave/work (as expected)   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Mark Waite  
 
 
Components: 
 git-plugin  
 
 
Created: 
 2018-08-17 07:17  
 
 
Environment: 
 Jenkins ver. 2.121.2  Git plugin 3.9.1  Java version 1.8.0_152  Windows 10 (master) (64bit)  Windows 7&10 (slaves) (64bit)  Installed Git version 2.14.2.windows.3  
 
 
Priority: 
  Minor  
 
 
Reporter: 
 Daan Timmer  
 

  
 
 
 
 

 
 Description of expected/wanted behaviour: 
 
Build/checkout branch 'specificbranch' 
before build merge 'specificbranch' with 'masterbranch' with upstream stracking of 'masterbranch' 
when build starts expect workspace to be in a merged version of 'masterbranch' with 'specificbranch' 
 Setup: 
 
pipeline job 
 
parameters 
 
repoName: full repository name 
branchRef: full branch ref (ex refs/heads/master)  
  
SCM git