Package io.jenkins.blueocean.scm.api
Class AbstractMultiBranchCreateRequest
java.lang.Object
io.jenkins.blueocean.rest.model.BluePipelineCreateRequest
io.jenkins.blueocean.scm.api.AbstractPipelineCreateRequest
io.jenkins.blueocean.scm.api.AbstractMultiBranchCreateRequest
Creates
MultiBranchProjects with a single SCMSource-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
Fields inherited from class io.jenkins.blueocean.scm.api.AbstractPipelineCreateRequest
scmConfig -
Constructor Summary
ConstructorsConstructorDescriptionAbstractMultiBranchCreateRequest(String name, io.jenkins.blueocean.rest.model.BlueScmConfig scmConfig) -
Method Summary
Modifier and TypeMethodDescriptionio.jenkins.blueocean.rest.model.BluePipelinecreate(io.jenkins.blueocean.rest.model.BlueOrganization organization, io.jenkins.blueocean.rest.Reachable parent) protected abstract jenkins.scm.api.SCMSourcecreateSource(jenkins.branch.MultiBranchProject project, io.jenkins.blueocean.rest.model.BlueScmConfig scmConfig) Create the source for the MultiBranchProject created with this requestprotected AbstractScmSourceEventgetScmSourceEvent(jenkins.branch.MultiBranchProject project, jenkins.scm.api.SCMSource source) protected booleanrepoHasJenkinsFile(jenkins.scm.api.SCMSource scmSource) Certain SCMSource can tell whether it can detect presence of Jenkinsfile across all branchesprotected abstract List<io.jenkins.blueocean.commons.ErrorMessage.Error> Validate the provided SCMConfig and test that a connection can be made to the SCM serverMethods inherited from class io.jenkins.blueocean.scm.api.AbstractPipelineCreateRequest
checkUserIsAuthenticatedAndHasItemCreatePermission, computeCredentialId, createProject, getParentMethods inherited from class io.jenkins.blueocean.rest.model.BluePipelineCreateRequest
getName, setName
-
Constructor Details
-
AbstractMultiBranchCreateRequest
public AbstractMultiBranchCreateRequest(String name, io.jenkins.blueocean.rest.model.BlueScmConfig scmConfig)
-
-
Method Details
-
create
public io.jenkins.blueocean.rest.model.BluePipeline create(@NonNull io.jenkins.blueocean.rest.model.BlueOrganization organization, @NonNull io.jenkins.blueocean.rest.Reachable parent) throws IOException - Specified by:
createin classio.jenkins.blueocean.rest.model.BluePipelineCreateRequest- Throws:
IOException
-
getScmSourceEvent
@Nullable protected AbstractScmSourceEvent getScmSourceEvent(@NonNull jenkins.branch.MultiBranchProject project, @NonNull jenkins.scm.api.SCMSource source) - Returns:
- Get
SCMSourceEvent
-
createSource
protected abstract jenkins.scm.api.SCMSource createSource(@NonNull jenkins.branch.MultiBranchProject project, @NonNull io.jenkins.blueocean.rest.model.BlueScmConfig scmConfig) Create the source for the MultiBranchProject created with this request- Parameters:
project- that was createdscmConfig- config- Returns:
- valid SCMSource
-
validate
protected abstract List<io.jenkins.blueocean.commons.ErrorMessage.Error> validate(String name, io.jenkins.blueocean.rest.model.BlueScmConfig scmConfig) Validate the provided SCMConfig and test that a connection can be made to the SCM server- Parameters:
name- of pipeline being createdscmConfig- to validate- Returns:
- errors occurring during validation
-
repoHasJenkinsFile
protected boolean repoHasJenkinsFile(@NonNull jenkins.scm.api.SCMSource scmSource) Certain SCMSource can tell whether it can detect presence of Jenkinsfile across all branches- Parameters:
scmSource- scm source- Returns:
- true as default. false if it can determine there is no Jenkinsfile in all branches
-