Chaining freestyle with a Pipeline on the same Git hash?

54 views
Skip to first unread message

Dan Tran

unread,
Apr 26, 2017, 2:40:43 AM4/26/17
to Jenkins Users

Hi

I have no issue chaining 2 freestyle jobs the same git commit, however, not possible from FS to Pipeline which throws exception.  Is there any one successfully doing so?

Thanks

-D

Christopher Orr

unread,
Apr 26, 2017, 5:08:12 AM4/26/17
to jenkins...@googlegroups.com
Hi there,
It's not entirely clear to me what you're asking — how exactly are you
trying to chain the jobs, and what exception are you seeing, when and
where?

Regards,
Chris

Dan Tran

unread,
Apr 26, 2017, 12:45:35 PM4/26/17
to Jenkins Users
My apology for the incompleteness

Here are my build info

* 2 jobs configure with same git repo same branch ( master)
* First job ( freestyle) triggers 2nd job with Build Trigger Parameters and passing over 'Pass thru git commit that was built'

exception: 

Checking out Revision ff5e8f0a7ee15cbbf65c1fbb8a4c91fdd0451bd1 (refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f ff5e8f0a7ee15cbbf65c1fbb8a4c91fdd0451bd1
hudson.plugins.git.GitException: Could not checkout ff5e8f0a7ee15cbbf65c1fbb8a4c91fdd0451bd1
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:2141)
	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1155)
	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109)
	at org.jenkinsci.plugins.workflow.libs.SCMSourceRetriever.doRetrieve(SCMSourceRetriever.java:108)
	at org.jenkinsci.plugins.workflow.libs.SCMSourceRetriever.retrieve(SCMSourceRetriever.java:84)
	at org.jenkinsci.plugins.workflow.libs.LibraryAdder.retrieve(LibraryAdder.java:150)
	at org.jenkinsci.plugins.workflow.libs.LibraryAdder.add(LibraryAdder.java:131)
	at org.jenkinsci.plugins.workflow.libs.LibraryDecorator$1.call(LibraryDecorator.java:114)
	at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1053)
	at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:591)
	at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:569)
	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:546)
	at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298)
	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
	at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688)
	at groovy.lang.GroovyShell.parse(GroovyShell.java:700)
	at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:116)
	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:430)
	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:393)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:238)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:404)
Caused by: hudson.plugins.git.GitException: Command "git checkout -f ff5e8f0a7ee15cbbf65c1fbb8a4c91fdd0451bd1" returned status code 128:
stdout: 
stderr: fatal: reference is not a tree: ff5e8f0a7ee15cbbf65c1fbb8a4c91fdd0451bd1


-D

Dan Tran

unread,
Apr 26, 2017, 8:48:45 PM4/26/17
to Jenkins Users
It turns out my pipeline uses another internal jenkins pipeline library via @Library('xx...@0.0.1') _

this is why it bails.  

I think the jenkins library tag should be influenced external upstream job git params

is it a bug I should file?

Thanks

-Dan

Dan Tran

unread,
Apr 27, 2017, 2:14:54 AM4/27/17
to Jenkins Users
I meant the jenkins library must NOT be influenced by external upstream job git params
Reply all
Reply to author
Forward
0 new messages