Class PipelineMultiBranchDefaultsProjectFactory

java.lang.Object
hudson.model.AbstractDescribableImpl<jenkins.branch.MultiBranchProjectFactory>
jenkins.branch.MultiBranchProjectFactory
jenkins.branch.MultiBranchProjectFactory.BySCMSourceCriteria
org.jenkinsci.plugins.pipeline.multibranch.defaults.PipelineMultiBranchDefaultsProjectFactory
All Implemented Interfaces:
ExtensionPoint, Describable<jenkins.branch.MultiBranchProjectFactory>

public class PipelineMultiBranchDefaultsProjectFactory extends jenkins.branch.MultiBranchProjectFactory.BySCMSourceCriteria
Recognizes and builds by default Jenkinsfile.
  • Field Details

  • Constructor Details

    • PipelineMultiBranchDefaultsProjectFactory

      @DataBoundConstructor public PipelineMultiBranchDefaultsProjectFactory()
  • Method Details

    • setScriptId

      @DataBoundSetter public void setScriptId(String scriptId)
      Set the script ID which will be used to reference the config file management for the contents of a Jenkinsfile.
      Parameters:
      scriptId - The ID of the groovy script to read as a Jenkinsfile.
    • getScriptId

      public String getScriptId()
      Get the script ID which will be used to read the Jenkinsfile from config file management.
      Returns:
      The Jenkinsfile script ID.
    • setUseSandbox

      @DataBoundSetter public void setUseSandbox(boolean useSandbox)
      Set whether or not a Jenkinsfile should run within a Groovy sandbox.
      Parameters:
      useSandbox - Set true to enable Groovy sandbox or false to run in Jenkins master runtime.
    • getUseSandbox

      public boolean getUseSandbox()
      Get the current setting for whether or not to use a groovy sandbox.
      Returns:
      true if using a groovy sandbox is desired.
    • doCreateProject

      protected org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject doCreateProject(ItemGroup<?> parent, String name, Map<String,Object> attributes)
      Specified by:
      doCreateProject in class jenkins.branch.MultiBranchProjectFactory.BySCMSourceCriteria
    • updateExistingProject

      public void updateExistingProject(jenkins.branch.MultiBranchProject<?,?> project, Map<String,Object> attributes, TaskListener listener) throws IOException, InterruptedException
      Overrides:
      updateExistingProject in class jenkins.branch.MultiBranchProjectFactory
      Throws:
      IOException
      InterruptedException
    • getSCMSourceCriteria

      protected jenkins.scm.api.SCMSourceCriteria getSCMSourceCriteria(jenkins.scm.api.SCMSource source)
      Specified by:
      getSCMSourceCriteria in class jenkins.branch.MultiBranchProjectFactory.BySCMSourceCriteria