Hi Guys,

With MultiBranch I can access the name of the Jenkinsfile script path from 
SCMSourceOwner()  e.g.

public String getScriptPathOrDefault() {
   SCMSourceOwner owner = getOwner();
   if (owner instanceof WorkflowMultiBranchProject) {
      WorkflowMultiBranchProject branchProject = (WorkflowMultiBranchProject) 
owner;
      WorkflowBranchProjectFactory branchProjectFactory = 
(WorkflowBranchProjectFactory) branchProject.getProjectFactory();
      return branchProjectFactory.getScriptPath();
   }
   return "Jenkinsfile";
}


However from a Pipeline (workflow) I'm unable to find any way to access the 
name of the Jenkinsfile Script.

Ideally I would like to know the value during an SCM.checkout(...) perhaps 
via Run<?,?> run, probably from WorkflowJob or something.


Kind regards,
Paul

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/373b7324-fcf5-4e5b-9f6d-2b6cdf1a30d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to