Class BitbucketSCMSourceContext
java.lang.Object
jenkins.scm.api.trait.SCMSourceContext<BitbucketSCMSourceContext,BitbucketSCMSourceRequest>
com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSourceContext
public class BitbucketSCMSourceContext
extends jenkins.scm.api.trait.SCMSourceContext<BitbucketSCMSourceContext,BitbucketSCMSourceRequest>
The
SCMSourceContext
for bitbucket.- Since:
- 2.2.0
-
Constructor Summary
ConstructorDescriptionBitbucketSCMSourceContext
(jenkins.scm.api.SCMSourceCriteria criteria, jenkins.scm.api.SCMHeadObserver observer) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionfinal Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy>
Returns the set ofChangeRequestCheckoutStrategy
to create for each fork pull request.newRequest
(jenkins.scm.api.SCMSource scmSource, TaskListener taskListener) final boolean
Returnstrue
if notifications should be disabled.final Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy>
Returns the set ofChangeRequestCheckoutStrategy
to create for each origin pull request.final boolean
Returns if aborted builds should be passed as stopped/cancelled to Bitbucket.boolean
Returns if not build jobs should be passed as stopped/cancelled to Bitbucket.final boolean
Returnstrue
if unstable builds should be passed as successful to Bitbucket.final boolean
Returnstrue
if pull requests from public repositories should be skipped.skipPublicPRs
(boolean skipPublicPRs) Controls the skipping of pull requests from public repositories.final boolean
Returnstrue
if theBitbucketSCMSourceRequest
will need information about branches.wantBranches
(boolean include) Adds a requirement for branch details to anyBitbucketSCMSourceRequest
for this context.final boolean
Returnstrue
if theBitbucketSCMSourceRequest
will need information about fork pull requests.wantForkPRs
(boolean include) Adds a requirement for fork pull request details to anyBitbucketSCMSourceRequest
for this context.final boolean
Returnstrue
if theBitbucketSCMSourceRequest
will need information about origin pull requests.wantOriginPRs
(boolean include) Adds a requirement for origin pull request details to anyBitbucketSCMSourceRequest
for this context.final boolean
wantPRs()
Returnstrue
if theBitbucketSCMSourceRequest
will need information about pull requests.final boolean
wantTags()
Returnstrue
if theBitbucketSCMSourceRequest
will need information about tags.wantTags
(boolean include) Adds a requirement for tag details to anyBitbucketSCMSourceRequest
for this context.final WebhookConfiguration
Returns theWebhookConfiguration
configuration.webhookConfiguration
(WebhookConfiguration configuration) Defines theWebhookRegistration
mode to use in this context.final WebhookRegistration
Returns theWebhookRegistration
mode.Defines theWebhookRegistration
mode to use in this context.withForkPRStrategies
(Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> strategies) Defines theChangeRequestCheckoutStrategy
instances to create for each fork pull request.withNotificationsDisabled
(boolean disabled) Defines the notification mode to use in this context.withOriginPRStrategies
(Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> strategies) Defines theChangeRequestCheckoutStrategy
instances to create for each origin pull request.withSendStopNotificationForNotBuildJobs
(boolean sendStopped) Defines behaviour of not-built jobs in Bitbucket.withSendStoppedNotificationForAbortBuild
(boolean sendStopped) Defines behaviour of unstable builds in Bitbucket.withSendSuccessNotificationForUnstableBuild
(boolean isUnstableBuildSuccess) Defines behaviour of unstable builds in Bitbucket.Methods inherited from class jenkins.scm.api.trait.SCMSourceContext
authorities, criteria, filters, observer, prefilters, withAuthority, withCriteria, withFilter, withPrefilter, withTrait, withTraits, withTraits
-
Constructor Details
-
BitbucketSCMSourceContext
public BitbucketSCMSourceContext(@CheckForNull jenkins.scm.api.SCMSourceCriteria criteria, @NonNull jenkins.scm.api.SCMHeadObserver observer) Constructor.- Parameters:
criteria
- (optional) criteria.observer
- theSCMHeadObserver
.
-
-
Method Details
-
wantBranches
public final boolean wantBranches()Returnstrue
if theBitbucketSCMSourceRequest
will need information about branches.- Returns:
true
if theBitbucketSCMSourceRequest
will need information about branches.
-
wantTags
public final boolean wantTags()Returnstrue
if theBitbucketSCMSourceRequest
will need information about tags.- Returns:
true
if theBitbucketSCMSourceRequest
will need information about tags.
-
wantPRs
public final boolean wantPRs()Returnstrue
if theBitbucketSCMSourceRequest
will need information about pull requests.- Returns:
true
if theBitbucketSCMSourceRequest
will need information about pull requests.
-
wantOriginPRs
public final boolean wantOriginPRs()Returnstrue
if theBitbucketSCMSourceRequest
will need information about origin pull requests.- Returns:
true
if theBitbucketSCMSourceRequest
will need information about origin pull requests.
-
wantForkPRs
public final boolean wantForkPRs()Returnstrue
if theBitbucketSCMSourceRequest
will need information about fork pull requests.- Returns:
true
if theBitbucketSCMSourceRequest
will need information about fork pull requests.
-
skipPublicPRs
public final boolean skipPublicPRs()Returnstrue
if pull requests from public repositories should be skipped.- Returns:
true
if pull requests from public repositories should be skipped.
-
originPRStrategies
Returns the set ofChangeRequestCheckoutStrategy
to create for each origin pull request.- Returns:
- the set of
ChangeRequestCheckoutStrategy
to create for each origin pull request.
-
forkPRStrategies
Returns the set ofChangeRequestCheckoutStrategy
to create for each fork pull request.- Returns:
- the set of
ChangeRequestCheckoutStrategy
to create for each fork pull request.
-
webhookRegistration
Returns theWebhookRegistration
mode.- Returns:
- the
WebhookRegistration
mode.
-
webhookConfiguration
Returns theWebhookConfiguration
configuration.- Returns:
- the
WebhookConfiguration
configuration.
-
notificationsDisabled
public final boolean notificationsDisabled()Returnstrue
if notifications should be disabled.- Returns:
true
if notifications should be disabled.
-
sendStopNotificationForAbortBuild
public final boolean sendStopNotificationForAbortBuild()Returns if aborted builds should be passed as stopped/cancelled to Bitbucket.- Returns:
true
if aborted builds should be passed as stopped/cancelled to Bitbucket.
-
sendSuccessNotificationForUnstableBuild
public final boolean sendSuccessNotificationForUnstableBuild()Returnstrue
if unstable builds should be passed as successful to Bitbucket.- Returns:
true
if unstable builds should be passed as successful to Bitbucket.
-
sendStopNotificationForNotBuildJobs
public boolean sendStopNotificationForNotBuildJobs()Returns if not build jobs should be passed as stopped/cancelled to Bitbucket.- Returns:
- if not build jobs should be passed as stopped to Bitbucket.
-
wantBranches
Adds a requirement for branch details to anyBitbucketSCMSourceRequest
for this context.- Parameters:
include
-true
to add the requirement orfalse
to leave the requirement as is (makes simpler with method chaining)- Returns:
this
for method chaining.
-
wantTags
Adds a requirement for tag details to anyBitbucketSCMSourceRequest
for this context.- Parameters:
include
-true
to add the requirement orfalse
to leave the requirement as is (makes simpler with method chaining)- Returns:
this
for method chaining.
-
wantOriginPRs
Adds a requirement for origin pull request details to anyBitbucketSCMSourceRequest
for this context.- Parameters:
include
-true
to add the requirement orfalse
to leave the requirement as is (makes simpler with method chaining)- Returns:
this
for method chaining.
-
wantForkPRs
Adds a requirement for fork pull request details to anyBitbucketSCMSourceRequest
for this context.- Parameters:
include
-true
to add the requirement orfalse
to leave the requirement as is (makes simpler with method chaining)- Returns:
this
for method chaining.
-
skipPublicPRs
Controls the skipping of pull requests from public repositories.- Parameters:
skipPublicPRs
-true
if pull requests from public repositories should be skipped.- Returns:
this
for method chaining.
-
withOriginPRStrategies
@NonNull public final BitbucketSCMSourceContext withOriginPRStrategies(@NonNull Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> strategies) Defines theChangeRequestCheckoutStrategy
instances to create for each origin pull request.- Parameters:
strategies
- the strategies.- Returns:
this
for method chaining.
-
withForkPRStrategies
@NonNull public final BitbucketSCMSourceContext withForkPRStrategies(@NonNull Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> strategies) Defines theChangeRequestCheckoutStrategy
instances to create for each fork pull request.- Parameters:
strategies
- the strategies.- Returns:
this
for method chaining.
-
webhookConfiguration
@NonNull public final BitbucketSCMSourceContext webhookConfiguration(WebhookConfiguration configuration) Defines theWebhookRegistration
mode to use in this context.- Parameters:
configuration
- the webhook configuration.- Returns:
this
for method chaining.
-
webhookRegistration
Defines theWebhookRegistration
mode to use in this context.- Parameters:
mode
- the mode.- Returns:
this
for method chaining.
-
withNotificationsDisabled
Defines the notification mode to use in this context.- Parameters:
disabled
-true
to disable automatic notifications.- Returns:
this
for method chaining.
-
withSendSuccessNotificationForUnstableBuild
@NonNull public final BitbucketSCMSourceContext withSendSuccessNotificationForUnstableBuild(boolean isUnstableBuildSuccess) Defines behaviour of unstable builds in Bitbucket.- Parameters:
isUnstableBuildSuccess
-true
to consider unstable builds successful when notifying Bitbucket.- Returns:
this
for method chaining.
-
withSendStoppedNotificationForAbortBuild
@NonNull public final BitbucketSCMSourceContext withSendStoppedNotificationForAbortBuild(boolean sendStopped) Defines behaviour of unstable builds in Bitbucket.- Parameters:
sendStopped
-true
to consider aborted builds as stopped when notifying Bitbucket.- Returns:
this
for method chaining.
-
withSendStopNotificationForNotBuildJobs
@NonNull public final BitbucketSCMSourceContext withSendStopNotificationForNotBuildJobs(boolean sendStopped) Defines behaviour of not-built jobs in Bitbucket.- Parameters:
sendStopped
-false
to consider aborted builds as stopped when notifying Bitbucket.- Returns:
this
for method chaining.
-
newRequest
@NonNull public BitbucketSCMSourceRequest newRequest(@NonNull jenkins.scm.api.SCMSource scmSource, TaskListener taskListener) - Specified by:
newRequest
in classjenkins.scm.api.trait.SCMSourceContext<BitbucketSCMSourceContext,
BitbucketSCMSourceRequest>
-