public class BitbucketGitSCMBuilder extends jenkins.plugins.git.GitSCMBuilder<BitbucketGitSCMBuilder>
GitSCMBuilder
specialized for bitbucket.Constructor and Description |
---|
BitbucketGitSCMBuilder(BitbucketSCMSource scmSource,
jenkins.scm.api.SCMHead head,
jenkins.scm.api.SCMRevision revision,
String credentialsId)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
hudson.plugins.git.GitSCM |
build() |
List<BitbucketHref> |
cloneLinks()
Returns the clone links (possibly empty).
|
BitbucketSCMSource |
scmSource()
Returns the
BitbucketSCMSource that this request is against (primarily to allow resolving credentials
against SCMSource.getOwner() ). |
BitbucketGitSCMBuilder |
withBitbucketRemote()
Updates the
GitSCMBuilder.withRemote(String) based on the current SCMBuilder.head() and
SCMBuilder.revision() . |
BitbucketGitSCMBuilder |
withCloneLinks(List<BitbucketHref> cloneLinks)
Provides the clone links from the
BitbucketRepository to allow inference of ports for different protocols. |
BitbucketGitSCMBuilder |
withCredentials(String credentialsId,
BitbucketRepositoryProtocol protocol)
Configures the
IdCredentials.getId() of the Credentials to use when connecting to the
GitSCMBuilder.remote() |
additionalRemote, additionalRemoteNames, additionalRemoteRefSpecs, asRefSpecs, asRemoteConfigs, browser, credentialsId, extensions, gitTool, refSpecs, remote, remoteName, withAdditionalRemote, withAdditionalRemote, withBrowser, withCredentials, withExtension, withExtensions, withExtensions, withGitTool, withoutRefSpecs, withRefSpec, withRefSpecs, withRemote, withRemoteName
head, revision, scmClass, withHead, withRevision, withTrait, withTraits, withTraits
public BitbucketGitSCMBuilder(@NonNull BitbucketSCMSource scmSource, @NonNull jenkins.scm.api.SCMHead head, @CheckForNull jenkins.scm.api.SCMRevision revision, @CheckForNull String credentialsId)
scmSource
- the BitbucketSCMSource
.head
- the SCMHead
revision
- the (optional) SCMRevision
credentialsId
- The IdCredentials.getId()
of the Credentials
to use when connecting to
the GitSCMBuilder.remote()
or null
to let the git client choose between providing its own
credentials or connecting anonymously.public BitbucketGitSCMBuilder withCloneLinks(List<BitbucketHref> cloneLinks)
BitbucketRepository
to allow inference of ports for different protocols.cloneLinks
- the clone links.this
for method chaining.@NonNull public BitbucketSCMSource scmSource()
BitbucketSCMSource
that this request is against (primarily to allow resolving credentials
against SCMSource.getOwner()
).BitbucketSCMSource
that this request is against@NonNull public List<BitbucketHref> cloneLinks()
@NonNull public BitbucketGitSCMBuilder withCredentials(String credentialsId, BitbucketRepositoryProtocol protocol)
IdCredentials.getId()
of the Credentials
to use when connecting to the
GitSCMBuilder.remote()
credentialsId
- the IdCredentials.getId()
of the Credentials
to use when connecting to
the GitSCMBuilder.remote()
or null
to let the git client choose between providing its own
credentials or connecting anonymously.protocol
- the BitbucketRepositoryProtocol
of the Credentials
to use or null
to detect the protocol based on the credentialsId. Defaults to HTTP if credentials are
null
. Enables support for blank SSH credentials.this
for method chaining.@NonNull public BitbucketGitSCMBuilder withBitbucketRemote()
GitSCMBuilder.withRemote(String)
based on the current SCMBuilder.head()
and
SCMBuilder.revision()
.
Will be called automatically by build()
but exposed in case the correct remote is required after
changing the GitSCMBuilder.withCredentials(String)
.this
for method chaining.@NonNull public hudson.plugins.git.GitSCM build()
build
in class jenkins.plugins.git.GitSCMBuilder<BitbucketGitSCMBuilder>
Copyright © 2016–2022. All rights reserved.