Class BitbucketSCMSource
java.lang.Object
hudson.model.AbstractDescribableImpl<jenkins.scm.api.SCMSource>
jenkins.scm.api.SCMSource
com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource
- All Implemented Interfaces:
- ExtensionPoint,- Describable<jenkins.scm.api.SCMSource>
public class BitbucketSCMSource
extends jenkins.scm.api.SCMSource
SCM source implementation for Bitbucket.
 It provides a way to discover/retrieve branches and pull requests through the Bitbucket REST API
 which is much faster than the plain Git SCM source implementation.
- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from class jenkins.scm.api.SCMSourcejenkins.scm.api.SCMSource.SourceByItemNested classes/interfaces inherited from interface hudson.ExtensionPointExtensionPoint.LegacyInstancesAreScopedToHudson
- 
Field SummaryFields inherited from class jenkins.scm.api.SCMSourcePRONOUN
- 
Constructor SummaryConstructorsConstructorDescriptionBitbucketSCMSource(String repoOwner, String repository) Constructor.BitbucketSCMSource(String id, String repoOwner, String repository) Deprecated.
- 
Method SummaryModifier and TypeMethodDescriptionvoidbuild(jenkins.scm.api.SCMHead head, jenkins.scm.api.SCMRevision revision) buildBitbucketClient(String repoOwner, String repository) static intReturns how long to delay events received from Bitbucket in order to allow the API caches to sync.protected StringList<jenkins.scm.api.trait.SCMSourceTrait>jenkins.scm.api.SCMRevisiongetTrustedRevision(jenkins.scm.api.SCMRevision revision, TaskListener listener) booleanisCloud()Deprecated, for removal: This API element is subject to removal in a future version.jenkins.scm.api.SCMHeadOriginprotected jenkins.scm.api.SCMRevisionretrieve(jenkins.scm.api.SCMHead head, TaskListener listener) protected voidretrieve(jenkins.scm.api.SCMSourceCriteria criteria, jenkins.scm.api.SCMHeadObserver observer, jenkins.scm.api.SCMHeadEvent<?> event, TaskListener listener) retrieveActions(jenkins.scm.api.SCMHead head, jenkins.scm.api.SCMHeadEvent event, TaskListener listener) retrieveActions(jenkins.scm.api.SCMSourceEvent event, TaskListener listener) voidsetCredentialsId(String credentialsId) static voidsetEventDelaySeconds(int eventDelaySeconds) Sets how long to delay events received from Bitbucket in order to allow the API caches to sync.voidsetMirrorId(String mirrorId) voidsetServerUrl(String serverURL) voidMethods inherited from class jenkins.scm.api.SCMSourcebuild, canProbe, checkInterrupt, createProbe, defaultListener, equals, fetch, fetch, fetch, fetch, fetch, fetch, fetch, fetch, fetchActions, fetchActions, fetchActions, fetchRevisions, fetchRevisions, fromSCMFileSystem, getCategories, getCriteria, getId, getOwner, getPronoun, hashCode, hasId, isCategoryEnabled, newProbe, parentHeads, parentRevisions, retrieve, retrieve, retrieve, retrieve, retrieve, retrieve, retrieveActions, retrieveRevisions, retrieveRevisions, setId, setOwner, toString, withId
- 
Constructor Details- 
BitbucketSCMSource@DataBoundConstructor public BitbucketSCMSource(@NonNull String repoOwner, @NonNull String repository) Constructor.- Parameters:
- repoOwner- the repository owner.
- repository- the repository name.
- Since:
- 2.2.0
 
- 
BitbucketSCMSource@Deprecated public BitbucketSCMSource(@CheckForNull String id, @NonNull String repoOwner, @NonNull String repository) Deprecated.useBitbucketSCMSource(String, String)andSCMSource.setId(String)Legacy Constructor.- Parameters:
- id- the id.
- repoOwner- the repository owner.
- repository- the repository name.
 
 
- 
- 
Method Details- 
getCredentialsId
- 
setCredentialsId
- 
getMirrorId
- 
setMirrorId
- 
getRepoOwner
- 
getRepository
- 
getServerUrl
- 
setServerUrl
- 
getTraits- Overrides:
- getTraitsin class- jenkins.scm.api.SCMSource
 
- 
setTraits@DataBoundSetter public void setTraits(@CheckForNull List<jenkins.scm.api.trait.SCMSourceTrait> traits) - Overrides:
- setTraitsin class- jenkins.scm.api.SCMSource
 
- 
buildBitbucketClient
- 
buildBitbucketClient
- 
buildBitbucketClient
- 
afterSavepublic void afterSave()- Overrides:
- afterSavein class- jenkins.scm.api.SCMSource
 
- 
retrieveprotected void retrieve(@CheckForNull jenkins.scm.api.SCMSourceCriteria criteria, @NonNull jenkins.scm.api.SCMHeadObserver observer, @CheckForNull jenkins.scm.api.SCMHeadEvent<?> event, @NonNull TaskListener listener) throws IOException, InterruptedException - Specified by:
- retrievein class- jenkins.scm.api.SCMSource
- Throws:
- IOException
- InterruptedException
 
- 
retrieveprotected jenkins.scm.api.SCMRevision retrieve(jenkins.scm.api.SCMHead head, TaskListener listener) throws IOException, InterruptedException - Overrides:
- retrievein class- jenkins.scm.api.SCMSource
- Throws:
- IOException
- InterruptedException
 
- 
buildpublic SCM build(@NonNull jenkins.scm.api.SCMHead head, @CheckForNull jenkins.scm.api.SCMRevision revision) - Specified by:
- buildin class- jenkins.scm.api.SCMSource
 
- 
getProjectKey@CheckForNull @Restricted(org.kohsuke.accmod.restrictions.ProtectedExternally.class) protected String getProjectKey()
- 
getTrustedRevision@NonNull public jenkins.scm.api.SCMRevision getTrustedRevision(@NonNull jenkins.scm.api.SCMRevision revision, @NonNull TaskListener listener) throws IOException, InterruptedException - Overrides:
- getTrustedRevisionin class- jenkins.scm.api.SCMSource
- Throws:
- IOException
- InterruptedException
 
- 
getDescriptor- Specified by:
- getDescriptorin interface- Describable<jenkins.scm.api.SCMSource>
- Overrides:
- getDescriptorin class- jenkins.scm.api.SCMSource
 
- 
retrieveActions@NonNull protected List<Action> retrieveActions(@CheckForNull jenkins.scm.api.SCMSourceEvent event, @NonNull TaskListener listener) throws IOException, InterruptedException - Overrides:
- retrieveActionsin class- jenkins.scm.api.SCMSource
- Throws:
- IOException
- InterruptedException
 
- 
retrieveActions@NonNull protected List<Action> retrieveActions(@NonNull jenkins.scm.api.SCMHead head, @CheckForNull jenkins.scm.api.SCMHeadEvent event, @NonNull TaskListener listener) throws IOException, InterruptedException - Overrides:
- retrieveActionsin class- jenkins.scm.api.SCMSource
- Throws:
- IOException
- InterruptedException
 
- 
originOf
- 
getEventDelaySecondspublic static int getEventDelaySeconds()Returns how long to delay events received from Bitbucket in order to allow the API caches to sync.- Returns:
- how long to delay events received from Bitbucket in order to allow the API caches to sync.
 
- 
setEventDelaySeconds@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static void setEventDelaySeconds(int eventDelaySeconds) Sets how long to delay events received from Bitbucket in order to allow the API caches to sync.- Parameters:
- eventDelaySeconds- number of seconds to delay, will be restricted into a value within the range- [0,300]inclusive
 
- 
isCloudDeprecated, for removal: This API element is subject to removal in a future version.
 
- 
BitbucketSCMSource(String, String)andSCMSource.setId(String)