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
-
public abstract class AbstractMultiBranchCreateRequest extends AbstractPipelineCreateRequest
CreatesMultiBranchProject
s with a singleSCMSource
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbstractMultiBranchCreateRequest.JenkinsfileCriteria
-
Field Summary
-
Fields inherited from class io.jenkins.blueocean.scm.api.AbstractPipelineCreateRequest
scmConfig
-
-
Constructor Summary
Constructors Constructor Description AbstractMultiBranchCreateRequest(String name, io.jenkins.blueocean.rest.model.BlueScmConfig scmConfig)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description io.jenkins.blueocean.rest.model.BluePipeline
create(io.jenkins.blueocean.rest.model.BlueOrganization organization, io.jenkins.blueocean.rest.Reachable parent)
protected abstract jenkins.scm.api.SCMSource
createSource(jenkins.branch.MultiBranchProject project, io.jenkins.blueocean.rest.model.BlueScmConfig scmConfig)
Create the source for the MultiBranchProject created with this requestprotected AbstractScmSourceEvent
getScmSourceEvent(jenkins.branch.MultiBranchProject project, jenkins.scm.api.SCMSource source)
protected boolean
repoHasJenkinsFile(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(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-
Methods inherited from class io.jenkins.blueocean.scm.api.AbstractPipelineCreateRequest
checkUserIsAuthenticatedAndHasItemCreatePermission, computeCredentialId, createProject, getParent
-
-
-
-
Constructor Detail
-
AbstractMultiBranchCreateRequest
public AbstractMultiBranchCreateRequest(String name, io.jenkins.blueocean.rest.model.BlueScmConfig scmConfig)
-
-
Method Detail
-
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:
create
in 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
-
-