Skip to content

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

Description

@hejech

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions