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>
TheSCMSourceContext
for bitbucket.- Since:
- 2.2.0
-
-
Constructor Summary
Constructors Constructor Description BitbucketSCMSourceContext(jenkins.scm.api.SCMSourceCriteria criteria, jenkins.scm.api.SCMHeadObserver observer)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
disableNotificationForNotBuildJobs()
Returnsfalse
if not build jobs should be passed to Bitbucket.Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy>
forkPRStrategies()
Returns the set ofChangeRequestCheckoutStrategy
to create for each fork pull request.BitbucketSCMSourceRequest
newRequest(jenkins.scm.api.SCMSource scmSource, TaskListener taskListener)
boolean
notificationsDisabled()
Returnstrue
if notifications should be disabled.Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy>
originPRStrategies()
Returns the set ofChangeRequestCheckoutStrategy
to create for each origin pull request.boolean
sendSuccessNotificationForUnstableBuild()
Returnstrue
if unstable builds should be passed as successful to Bitbucket.boolean
skipPublicPRs()
Returnstrue
if pull requests from public repositories should be skipped.BitbucketSCMSourceContext
skipPublicPRs(boolean skipPublicPRs)
Controls the skipping of pull requests from public repositories.boolean
wantBranches()
Returnstrue
if theBitbucketSCMSourceRequest
will need information about branches.BitbucketSCMSourceContext
wantBranches(boolean include)
Adds a requirement for branch details to anyBitbucketSCMSourceRequest
for this context.boolean
wantForkPRs()
Returnstrue
if theBitbucketSCMSourceRequest
will need information about fork pull requests.BitbucketSCMSourceContext
wantForkPRs(boolean include)
Adds a requirement for fork pull request details to anyBitbucketSCMSourceRequest
for this context.boolean
wantOriginPRs()
Returnstrue
if theBitbucketSCMSourceRequest
will need information about origin pull requests.BitbucketSCMSourceContext
wantOriginPRs(boolean include)
Adds a requirement for origin pull request details to anyBitbucketSCMSourceRequest
for this context.boolean
wantPRs()
Returnstrue
if theBitbucketSCMSourceRequest
will need information about pull requests.boolean
wantTags()
Returnstrue
if theBitbucketSCMSourceRequest
will need information about tags.BitbucketSCMSourceContext
wantTags(boolean include)
Adds a requirement for tag details to anyBitbucketSCMSourceRequest
for this context.WebhookConfiguration
webhookConfiguration()
Returns theWebhookConfiguration
configuration.BitbucketSCMSourceContext
webhookConfiguration(WebhookConfiguration configuration)
Defines theWebhookRegistration
mode to use in this context.WebhookRegistration
webhookRegistration()
Returns theWebhookRegistration
mode.BitbucketSCMSourceContext
webhookRegistration(WebhookRegistration mode)
Defines theWebhookRegistration
mode to use in this context.BitbucketSCMSourceContext
withDisableNotificationForNotBuildJobs(boolean disabled)
Defines behaviour of not-built jobs in Bitbucket.BitbucketSCMSourceContext
withForkPRStrategies(Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> strategies)
Defines theChangeRequestCheckoutStrategy
instances to create for each fork pull request.BitbucketSCMSourceContext
withNotificationsDisabled(boolean disabled)
Defines the notification mode to use in this context.BitbucketSCMSourceContext
withOriginPRStrategies(Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> strategies)
Defines theChangeRequestCheckoutStrategy
instances to create for each origin pull request.BitbucketSCMSourceContext
withSendSuccessNotificationForUnstableBuild(boolean isUnstableBuildSuccess)
Defines behaviour of unstable builds in Bitbucket.
-
-
-
Method Detail
-
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
@NonNull public final Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> 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
@NonNull public final Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> 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
@NonNull public final WebhookRegistration webhookRegistration()
Returns theWebhookRegistration
mode.- Returns:
- the
WebhookRegistration
mode.
-
webhookConfiguration
@NonNull public final WebhookConfiguration 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.
-
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.
-
disableNotificationForNotBuildJobs
public boolean disableNotificationForNotBuildJobs()
Returnsfalse
if not build jobs should be passed to Bitbucket.- Returns:
false
if not build jobs should be passed to Bitbucket.
-
wantBranches
@NonNull public final BitbucketSCMSourceContext wantBranches(boolean include)
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
@NonNull public final BitbucketSCMSourceContext wantTags(boolean include)
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
@NonNull public final BitbucketSCMSourceContext wantOriginPRs(boolean include)
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
@NonNull public final BitbucketSCMSourceContext wantForkPRs(boolean include)
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
public final BitbucketSCMSourceContext skipPublicPRs(boolean 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
@NonNull public final BitbucketSCMSourceContext webhookRegistration(WebhookRegistration mode)
Defines theWebhookRegistration
mode to use in this context.- Parameters:
mode
- the mode.- Returns:
this
for method chaining.
-
withNotificationsDisabled
@NonNull public final BitbucketSCMSourceContext withNotificationsDisabled(boolean disabled)
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.
-
withDisableNotificationForNotBuildJobs
@NonNull public final BitbucketSCMSourceContext withDisableNotificationForNotBuildJobs(boolean disabled)
Defines behaviour of not-built jobs in Bitbucket.- Parameters:
disabled
-false
to report not-built jobs to 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>
-
-