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
MultiBranchProject
s with a single SCMSource
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
-
Field Summary
Fields inherited from class io.jenkins.blueocean.scm.api.AbstractPipelineCreateRequest
scmConfig
-
Constructor Summary
ConstructorDescriptionAbstractMultiBranchCreateRequest
(String name, io.jenkins.blueocean.rest.model.BlueScmConfig scmConfig) -
Method Summary
Modifier and TypeMethodDescriptionio.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 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, getParent
Methods 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:
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
-