Interface BitbucketEndpoint
- All Superinterfaces:
Describable<BitbucketEndpoint>
- All Known Implementing Classes:
AbstractBitbucketEndpoint
,BitbucketCloudEndpoint
,BitbucketServerEndpoint
The implementation represents an endpoint configuration to be used in
BitbucketSCMSource
.- Since:
- 936.4.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault com.cloudbees.plugins.credentials.common.StandardCredentials
Looks up theStandardCredentials
to use for auto-management of hooks.Returns theIdCredentials.getId()
of the credentials to use for auto-management of hooks.Name to use to describe the endpoint.Jenkins Server Root URL to be used by this Bitbucket endpoint.TheIdCredentials.getId()
of the credentials to use to verify the signature of hooks.getRepositoryURL
(String repoOwner, String repoSlug) The user facing URL of the specified repository.The URL of this endpoint.getType()
Returns the type of this endpoint.default org.jenkinsci.plugins.plaincredentials.StringCredentials
Looks up theStringCredentials
to use to verify the signature of hooks.boolean
Returns if the should or not verify incoming web hook payload from this endpoint.default boolean
isEquals
(BitbucketEndpoint endpoint) Returns if two endpoint are the equals.boolean
Returnstrue
if and only if Jenkins is supposed to auto-manage hooks for this end-point.void
setManageHooks
(boolean manageHooks, String credentialsId) Sets if Jenkins is supposed to auto-manage hooks for this end-point.
-
Method Details
-
getDisplayName
Name to use to describe the endpoint.- Returns:
- the name to use for the endpoint
-
getRepositoryURL
The user facing URL of the specified repository.- Parameters:
repoOwner
- the repository owner.repoSlug
- the repository name- Returns:
- the user facing URL of the specified repository.
-
getType
Returns the type of this endpoint.- Returns:
- endpoint type.
-
getServerURL
The URL of this endpoint.- Returns:
- the URL of the endpoint.
-
isManageHooks
boolean isManageHooks()Returnstrue
if and only if Jenkins is supposed to auto-manage hooks for this end-point.- Returns:
true
if and only if Jenkins is supposed to auto-manage hooks for this end-point.
-
setManageHooks
Sets if Jenkins is supposed to auto-manage hooks for this end-point.- Parameters:
manageHooks
- if Jenkins must auto-manage hooks registration.credentialsId
- credentialsId to use with rights to create or update web hook for Bitbucket repositories.
-
getCredentialsId
Returns theIdCredentials.getId()
of the credentials to use for auto-management of hooks.- Returns:
- the
IdCredentials.getId()
of the credentials to use for auto-management of hooks.
-
getEndpointJenkinsRootURL
Jenkins Server Root URL to be used by this Bitbucket endpoint. The global setting from Jenkins.get().getRootUrl() will be used if this field is null or equals an empty string.- Returns:
- the verbatim setting provided by endpoint configuration
-
isEnableHookSignature
@Restricted(org.kohsuke.accmod.restrictions.Beta.class) boolean isEnableHookSignature()Returns if the should or not verify incoming web hook payload from this endpoint.- Returns:
- the
true
if the web hook implementation configured for this endpoint should or not verify web hook payload that could be signed or crypted. - API Note:
- This method is under development so could be moved to an interface dedicated to webhooks implementation
-
getHookSignatureCredentialsId
@Restricted(org.kohsuke.accmod.restrictions.Beta.class) @CheckForNull String getHookSignatureCredentialsId()TheIdCredentials.getId()
of the credentials to use to verify the signature of hooks.- Returns:
- the configured credentials identifier to use
- API Note:
- This method is under development so could be moved to an interface dedicated to webhooks implementation
-
credentials
@CheckForNull default com.cloudbees.plugins.credentials.common.StandardCredentials credentials()Looks up theStandardCredentials
to use for auto-management of hooks.- Returns:
- the credentials or
null
.
-
hookSignatureCredentials
@Restricted(org.kohsuke.accmod.restrictions.Beta.class) @CheckForNull default org.jenkinsci.plugins.plaincredentials.StringCredentials hookSignatureCredentials()Looks up theStringCredentials
to use to verify the signature of hooks.- Returns:
- the credentials or
null
. - API Note:
- This method is under development so could be moved to an interface dedicated to webhook provider
-
isEquals
Returns if two endpoint are the equals.- Parameters:
endpoint
- to compare- Returns:
true
if endpoint are the same,false
otherwise
-
getDescriptor
BitbucketEndpointDescriptor getDescriptor()- Specified by:
getDescriptor
in interfaceDescribable<BitbucketEndpoint>
- See Also:
-