Calculate changelog against specific branch using weird ref syntax

1,110 views
Skip to first unread message

Jordan Coll

unread,
Jan 25, 2017, 7:52:08 AM1/25/17
to Jenkins Users
So I've been setting up a new pipeline job, and since we use private branches that are then merged into release branches, I added a  [$class: 'ChangelogToBranch', options: [compareRemote: "jordan/master", compareTarget: "master"]]  to my checkout.

This consistently results in
Using 'Changelog to branch' strategy.
fatal: bad revision '^jordan/master/master'
ERROR: Unable to retrieve changeset
hudson.plugins.git.GitException: Error launching git whatchanged
        at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$6.execute(CliGitAPIImpl.java:856)
        at hudson.plugins.git.GitSCM.computeChangeLog(GitSCM.java:1223)
        at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1143)
        at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109)
        at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:83)
        at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:73)
        at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
        at hudson.security.ACL.impersonate(ACL.java:221)
        at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

And yeah, '^jordan/master/master' ain't no revision I've ever heard of. Surely I'm doing something wrong?
But looking at the source, I can't figure out how this is supposed to work?
Did it ever?
Why is git whatchanged and not git log?
Is this a git koan? Cus i'm not feeling enlightened.



 

Jordan Coll

unread,
Jan 25, 2017, 8:47:59 AM1/25/17
to Jenkins Users
Ok. compareRemote should obviously be the remote (i.e. origin).
So yeah, works perfectly. Not feeling dumb at all =|
Reply all
Reply to author
Forward
0 new messages