Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: java.lang.Exception: Could not determine pipeline template on Pull Request only #331

Open
hejech opened this issue Oct 25, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@hejech
Copy link

hejech commented Oct 25, 2023

Jenkins Version

2.401.1

JTE Version

2.5.3

Bug Description

I get a java.lang.Exception when starting a pipeline on a pull request.
On other branches the pipeline works fine.

Relevant log output

08:04:36  [JTE] FileSystemWrapperFactory: Unable to create SCMFileSystem: job: build-arkv-bff-api-v1-jte/PR-167, scm: null
08:04:38  [JTE] FileSystemWrapperFactory: Unable to create SCMFileSystem: job: build-arkv-bff-api-v1-jte/PR-167, scm: null
08:04:38  java.lang.Exception: Could not determine pipeline template.
08:04:38  	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
08:04:38  	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
08:04:38  	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
08:04:38  	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
08:04:38  	at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
08:04:38  	at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
08:04:38  	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:250)
08:04:38  	at org.boozallen.plugins.jte.init.PipelineTemplateResolver.resolve(PipelineTemplateResolver.groovy:79)
08:04:38  	at org.boozallen.plugins.jte.init.PipelineTemplateResolver$resolve.call(Unknown Source)
08:04:38  	at org.boozallen.plugins.jte.job.TemplateFlowDefinition.create(TemplateFlowDefinition.groovy:80)
08:04:38  	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:312)
08:04:38  	at hudson.model.ResourceController.execute(ResourceController.java:101)
08:04:38  	at hudson.model.Executor.run(Executor.java:442)
08:04:38  Finished: FAILURE

Steps to Reproduce

Can be reproduced by starting the pipeline manually on the pull request

Additional Info

If I add a Pipeline Config )content of Jenkinsfile) directly to the Jenkins Pipeline Configuration, then it works for PRs also.

@hejech hejech added the bug Something isn't working label Oct 25, 2023
@Jmelendez93
Copy link

This happens for me with Bitbucket when using Discover pull requests from origin set to Merging the pull request with the current target branch revision. Changing it to The current pull request revision makes the issue go away, though the downside there is the code is not in a merged state, so presumably it requires everyone to be merging the target branch into their feature branch (which is a good practice, but not necessarily an assumption we can make for every developer).

@cokieffebah cokieffebah self-assigned this Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants