Class RemoteJenkinsFileWorkflowBranchProjectFactory
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<jenkins.branch.BranchProjectFactory<?,?>>
-
- jenkins.branch.BranchProjectFactory<org.jenkinsci.plugins.workflow.job.WorkflowJob,org.jenkinsci.plugins.workflow.job.WorkflowRun>
-
- org.jenkinsci.plugins.workflow.multibranch.AbstractWorkflowBranchProjectFactory
-
- org.jenkinsci.plugins.workflow.multibranch.WorkflowBranchProjectFactory
-
- org.jenkinsci.plugins.workflow.multibranch.extended.RemoteJenkinsFileWorkflowBranchProjectFactory
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<jenkins.branch.BranchProjectFactory<?,?>>
,Saveable
public class RemoteJenkinsFileWorkflowBranchProjectFactory extends org.jenkinsci.plugins.workflow.multibranch.WorkflowBranchProjectFactory
This class extendsWorkflowBranchProjectFactory
to inject defined Jenkins file and repository in Remote Jenkins File Plugin- Author:
- Aytunc BEKEN, aytuncbeken.ab@gmail.com
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RemoteJenkinsFileWorkflowBranchProjectFactory.DescriptorImpl
Descriptor Implementation forAbstractWorkflowMultiBranchProjectFactory
-
Nested classes/interfaces inherited from class org.jenkinsci.plugins.workflow.multibranch.AbstractWorkflowBranchProjectFactory
org.jenkinsci.plugins.workflow.multibranch.AbstractWorkflowBranchProjectFactory.AbstractWorkflowBranchProjectFactoryDescriptor
-
Nested classes/interfaces inherited from class jenkins.branch.BranchProjectFactory
jenkins.branch.BranchProjectFactory.HeadByItemImpl, jenkins.branch.BranchProjectFactory.SourceByItemImpl
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.jenkinsci.plugins.workflow.flow.FlowDefinition
createDefinition()
ExtendsWorkflowBranchProjectFactory
String
getFallbackBranch()
String
getLocalMarker()
Default getter methodBoolean
getLookupInParameters()
boolean
getMatchBranches()
Default getter methodString
getRemoteJenkinsFile()
Default getter methodSCM
getRemoteJenkinsFileSCM()
Default getter methodString
getScmSourceBranchName()
Default getter methodprotected jenkins.scm.api.SCMSourceCriteria
getSCMSourceCriteria(jenkins.scm.api.SCMSource source)
ExtendsWorkflowBranchProjectFactory
void
setFallbackBranch(String fallbackBranch)
void
setLookupInParameters(Boolean lookupInParameters)
void
setMatchBranches(boolean matchBranches)
JenkinsDataBoundSetter
void
setRemoteJenkinsFile(String remoteJenkinsFile)
JenkinsDataBoundSetter
void
setRemoteJenkinsFileSCM(SCM remoteJenkinsFileSCM)
JenkinsDataBoundSetter
void
setScmSourceBranchName(String scmSourceBranchName)
Set scmSourceBranchName to be used in new scm definition with new branch name-
Methods inherited from class org.jenkinsci.plugins.workflow.multibranch.WorkflowBranchProjectFactory
getScriptPath, readResolve, setScriptPath
-
Methods inherited from class org.jenkinsci.plugins.workflow.multibranch.AbstractWorkflowBranchProjectFactory
getBranch, isProject, newInstance, setBranch
-
-
-
-
Constructor Detail
-
RemoteJenkinsFileWorkflowBranchProjectFactory
@DataBoundConstructor public RemoteJenkinsFileWorkflowBranchProjectFactory(String remoteJenkinsFile, String localMarker, SCM remoteJenkinsFileSCM, Boolean matchBranches, String fallbackBranch, Boolean lookupInParameters)
JenkinsDataBoundConstructor
- Parameters:
localMarker
- path of an arbitrary local file which must be present for the project to be recognisedremoteJenkinsFile
- path of the JenkinsfileremoteJenkinsFileSCM
-SCM
definition for the Jenkinsfile
-
-
Method Detail
-
getLookupInParameters
public Boolean getLookupInParameters()
-
setLookupInParameters
@DataBoundSetter public void setLookupInParameters(Boolean lookupInParameters)
-
setRemoteJenkinsFile
@DataBoundSetter public void setRemoteJenkinsFile(String remoteJenkinsFile)
JenkinsDataBoundSetter
- Parameters:
remoteJenkinsFile
- path of the Jenkinsfile
-
setRemoteJenkinsFileSCM
@DataBoundSetter public void setRemoteJenkinsFileSCM(SCM remoteJenkinsFileSCM)
JenkinsDataBoundSetter
- Parameters:
remoteJenkinsFileSCM
-SCM
definition for the Jenkinsfile
-
createDefinition
protected org.jenkinsci.plugins.workflow.flow.FlowDefinition createDefinition()
ExtendsWorkflowBranchProjectFactory
- Overrides:
createDefinition
in classorg.jenkinsci.plugins.workflow.multibranch.WorkflowBranchProjectFactory
- Returns:
FlowDefinition
-
getSCMSourceCriteria
protected jenkins.scm.api.SCMSourceCriteria getSCMSourceCriteria(jenkins.scm.api.SCMSource source)
ExtendsWorkflowBranchProjectFactory
- Overrides:
getSCMSourceCriteria
in classorg.jenkinsci.plugins.workflow.multibranch.WorkflowBranchProjectFactory
- Parameters:
source
-SCMSource
- Returns:
SCMSourceCriteria
-
getRemoteJenkinsFile
public String getRemoteJenkinsFile()
Default getter method- Returns:
- remoteJenkinsFile
-
getRemoteJenkinsFileSCM
public SCM getRemoteJenkinsFileSCM()
Default getter method- Returns:
- remoteJenkinsFile
-
getLocalMarker
public String getLocalMarker()
Default getter method- Returns:
- localMarker
-
setMatchBranches
@DataBoundSetter public void setMatchBranches(boolean matchBranches)
JenkinsDataBoundSetter
- Parameters:
matchBranches
- True to enable match branches feature
-
getMatchBranches
public boolean getMatchBranches()
Default getter method- Returns:
- matchBranches
-
setScmSourceBranchName
public void setScmSourceBranchName(String scmSourceBranchName)
Set scmSourceBranchName to be used in new scm definition with new branch name- Parameters:
scmSourceBranchName
- Current branch name which MultiBranch pipeline working on.
-
getScmSourceBranchName
public String getScmSourceBranchName()
Default getter method- Returns:
- scmSourceBranchName
-
getFallbackBranch
public String getFallbackBranch()
-
setFallbackBranch
@DataBoundSetter public void setFallbackBranch(String fallbackBranch)
-
-