Class BitbucketGitSCMBuilder
java.lang.Object
jenkins.scm.api.trait.SCMBuilder<B,hudson.plugins.git.GitSCM>
 
jenkins.plugins.git.GitSCMBuilder<BitbucketGitSCMBuilder>
com.cloudbees.jenkins.plugins.bitbucket.BitbucketGitSCMBuilder
public class BitbucketGitSCMBuilder
extends jenkins.plugins.git.GitSCMBuilder<BitbucketGitSCMBuilder>
A 
GitSCMBuilder specialized for bitbucket.- Since:
- 2.2.0
- 
Constructor SummaryConstructorsConstructorDescriptionBitbucketGitSCMBuilder(BitbucketSCMSource scmSource, jenkins.scm.api.SCMHead head, jenkins.scm.api.SCMRevision revision, String credentialsId) Constructor.
- 
Method SummaryModifier and TypeMethodDescriptionhudson.plugins.git.GitSCMbuild()Returns theBitbucketSCMSourcethat this request is against (primarily to allow resolving credentials againstSCMSource.getOwner()).Updates theGitSCMBuilder.withRemote(String)based on the currentSCMBuilder.head()andSCMBuilder.revision().withCloneLinks(List<BitbucketHref> primaryCloneLinks, List<BitbucketHref> mirrorCloneLinks) Provides the clone links from theBitbucketRepositoryto allow inference of ports for different protocols.withCredentials(String credentialsId, BitbucketRepositoryProtocol protocol) Configures theIdCredentials.getId()of theCredentialsto use when connecting to theGitSCMBuilder.remote()Methods inherited from class jenkins.plugins.git.GitSCMBuilderadditionalRemote, additionalRemoteNames, additionalRemoteRefSpecs, asRefSpecs, asRemoteConfigs, browser, credentialsId, extensions, gitTool, refSpecs, remote, remoteName, withAdditionalRemote, withAdditionalRemote, withBrowser, withCredentials, withExtension, withExtensions, withExtensions, withGitTool, withoutRefSpecs, withRefSpec, withRefSpecs, withRemote, withRemoteNameMethods inherited from class jenkins.scm.api.trait.SCMBuilderhead, revision, scmClass, withHead, withRevision, withTrait, withTraits, withTraits
- 
Constructor Details- 
BitbucketGitSCMBuilderpublic BitbucketGitSCMBuilder(@NonNull BitbucketSCMSource scmSource, @NonNull jenkins.scm.api.SCMHead head, @CheckForNull jenkins.scm.api.SCMRevision revision, @CheckForNull String credentialsId) Constructor.- Parameters:
- scmSource- the- BitbucketSCMSource.
- head- the- SCMHead
- revision- the (optional)- SCMRevision
- credentialsId- The- IdCredentials.getId()of the- Credentialsto use when connecting to the- GitSCMBuilder.remote()or- nullto let the git client choose between providing its own credentials or connecting anonymously.
 
 
- 
- 
Method Details- 
withCloneLinkspublic BitbucketGitSCMBuilder withCloneLinks(@CheckForNull List<BitbucketHref> primaryCloneLinks, @CheckForNull List<BitbucketHref> mirrorCloneLinks) Provides the clone links from theBitbucketRepositoryto allow inference of ports for different protocols.- Parameters:
- primaryCloneLinks- the clone links for primary repository.
- mirrorCloneLinks- the clone links for mirror repository if it's configured.
- Returns:
- thisfor method chaining.
 
- 
scmSourceReturns theBitbucketSCMSourcethat this request is against (primarily to allow resolving credentials againstSCMSource.getOwner()).- Returns:
- the BitbucketSCMSourcethat this request is against
 
- 
withCredentials@NonNull public BitbucketGitSCMBuilder withCredentials(String credentialsId, BitbucketRepositoryProtocol protocol) Configures theIdCredentials.getId()of theCredentialsto use when connecting to theGitSCMBuilder.remote()- Parameters:
- credentialsId- the- IdCredentials.getId()of the- Credentialsto use when connecting to the- GitSCMBuilder.remote()or- nullto let the git client choose between providing its own credentials or connecting anonymously.
- protocol- the- BitbucketRepositoryProtocolof the- Credentialsto use or- nullto detect the protocol based on the credentialsId. Defaults to HTTP if credentials are- null. Enables support for blank SSH credentials.
- Returns:
- thisfor method chaining.
 
- 
withBitbucketRemoteUpdates theGitSCMBuilder.withRemote(String)based on the currentSCMBuilder.head()andSCMBuilder.revision(). Will be called automatically bybuild()but exposed in case the correct remote is required after changing theGitSCMBuilder.withCredentials(String).- Returns:
- thisfor method chaining.
 
- 
build@NonNull public hudson.plugins.git.GitSCM build()- Overrides:
- buildin class- jenkins.plugins.git.GitSCMBuilder<BitbucketGitSCMBuilder>
 
 
-