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
ConstructorsConstructorDescriptionBitbucketSCMSourceContext(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 ofChangeRequestCheckoutStrategyto create for each fork pull request.newRequest(jenkins.scm.api.SCMSource scmSource, TaskListener taskListener) final booleanReturnstrueif notifications should be disabled.final Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy>Returns the set ofChangeRequestCheckoutStrategyto create for each origin pull request.final booleanReturns if aborted builds should be passed as stopped/cancelled to Bitbucket.booleanReturns if not build jobs should be passed as stopped/cancelled to Bitbucket.final booleanReturnstrueif unstable builds should be passed as successful to Bitbucket.final booleanReturnstrueif pull requests from public repositories should be skipped.skipPublicPRs(boolean skipPublicPRs) Controls the skipping of pull requests from public repositories.booleanfinal booleanReturnstrueif theBitbucketSCMSourceRequestwill need information about branches.wantBranches(boolean include) Adds a requirement for branch details to anyBitbucketSCMSourceRequestfor this context.final booleanReturnstrueif theBitbucketSCMSourceRequestwill need information about fork pull requests.wantForkPRs(boolean include) Adds a requirement for fork pull request details to anyBitbucketSCMSourceRequestfor this context.final booleanReturnstrueif theBitbucketSCMSourceRequestwill need information about origin pull requests.wantOriginPRs(boolean include) Adds a requirement for origin pull request details to anyBitbucketSCMSourceRequestfor this context.final booleanwantPRs()Returnstrueif theBitbucketSCMSourceRequestwill need information about pull requests.final booleanwantTags()Returnstrueif theBitbucketSCMSourceRequestwill need information about tags.wantTags(boolean include) Adds a requirement for tag details to anyBitbucketSCMSourceRequestfor this context.final WebhookRegistrationReturns theWebhookRegistrationmode.Defines theWebhookRegistrationmode to use in this context.withForkPRStrategies(Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> strategies) Defines theChangeRequestCheckoutStrategyinstances 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 theChangeRequestCheckoutStrategyinstances 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.withUseReadableNotificationIds(boolean useReadableNotificationIds) 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()Returnstrueif theBitbucketSCMSourceRequestwill need information about branches.- Returns:
trueif theBitbucketSCMSourceRequestwill need information about branches.
-
wantTags
public final boolean wantTags()Returnstrueif theBitbucketSCMSourceRequestwill need information about tags.- Returns:
trueif theBitbucketSCMSourceRequestwill need information about tags.
-
wantPRs
public final boolean wantPRs()Returnstrueif theBitbucketSCMSourceRequestwill need information about pull requests.- Returns:
trueif theBitbucketSCMSourceRequestwill need information about pull requests.
-
wantOriginPRs
public final boolean wantOriginPRs()Returnstrueif theBitbucketSCMSourceRequestwill need information about origin pull requests.- Returns:
trueif theBitbucketSCMSourceRequestwill need information about origin pull requests.
-
wantForkPRs
public final boolean wantForkPRs()Returnstrueif theBitbucketSCMSourceRequestwill need information about fork pull requests.- Returns:
trueif theBitbucketSCMSourceRequestwill need information about fork pull requests.
-
skipPublicPRs
public final boolean skipPublicPRs()Returnstrueif pull requests from public repositories should be skipped.- Returns:
trueif pull requests from public repositories should be skipped.
-
originPRStrategies
Returns the set ofChangeRequestCheckoutStrategyto create for each origin pull request.- Returns:
- the set of
ChangeRequestCheckoutStrategyto create for each origin pull request.
-
forkPRStrategies
Returns the set ofChangeRequestCheckoutStrategyto create for each fork pull request.- Returns:
- the set of
ChangeRequestCheckoutStrategyto create for each fork pull request.
-
webhookRegistration
Returns theWebhookRegistrationmode.- Returns:
- the
WebhookRegistrationmode.
-
notificationsDisabled
public final boolean notificationsDisabled()Returnstrueif notifications should be disabled.- Returns:
trueif notifications should be disabled.
-
sendStopNotificationForAbortBuild
public final boolean sendStopNotificationForAbortBuild()Returns if aborted builds should be passed as stopped/cancelled to Bitbucket.- Returns:
trueif aborted builds should be passed as stopped/cancelled to Bitbucket.
-
sendSuccessNotificationForUnstableBuild
public final boolean sendSuccessNotificationForUnstableBuild()Returnstrueif unstable builds should be passed as successful to Bitbucket.- Returns:
trueif 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.
-
useReadableNotificationIds
public boolean useReadableNotificationIds() -
wantBranches
Adds a requirement for branch details to anyBitbucketSCMSourceRequestfor this context.- Parameters:
include-trueto add the requirement orfalseto leave the requirement as is (makes simpler with method chaining)- Returns:
thisfor method chaining.
-
wantTags
Adds a requirement for tag details to anyBitbucketSCMSourceRequestfor this context.- Parameters:
include-trueto add the requirement orfalseto leave the requirement as is (makes simpler with method chaining)- Returns:
thisfor method chaining.
-
wantOriginPRs
Adds a requirement for origin pull request details to anyBitbucketSCMSourceRequestfor this context.- Parameters:
include-trueto add the requirement orfalseto leave the requirement as is (makes simpler with method chaining)- Returns:
thisfor method chaining.
-
wantForkPRs
Adds a requirement for fork pull request details to anyBitbucketSCMSourceRequestfor this context.- Parameters:
include-trueto add the requirement orfalseto leave the requirement as is (makes simpler with method chaining)- Returns:
thisfor method chaining.
-
skipPublicPRs
Controls the skipping of pull requests from public repositories.- Parameters:
skipPublicPRs-trueif pull requests from public repositories should be skipped.- Returns:
thisfor method chaining.
-
withOriginPRStrategies
@NonNull public final BitbucketSCMSourceContext withOriginPRStrategies(@NonNull Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> strategies) Defines theChangeRequestCheckoutStrategyinstances to create for each origin pull request.- Parameters:
strategies- the strategies.- Returns:
thisfor method chaining.
-
withForkPRStrategies
@NonNull public final BitbucketSCMSourceContext withForkPRStrategies(@NonNull Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> strategies) Defines theChangeRequestCheckoutStrategyinstances to create for each fork pull request.- Parameters:
strategies- the strategies.- Returns:
thisfor method chaining.
-
webhookRegistration
Defines theWebhookRegistrationmode to use in this context.- Parameters:
mode- the mode.- Returns:
thisfor method chaining.
-
withNotificationsDisabled
Defines the notification mode to use in this context.- Parameters:
disabled-trueto disable automatic notifications.- Returns:
thisfor method chaining.
-
withSendSuccessNotificationForUnstableBuild
@NonNull public final BitbucketSCMSourceContext withSendSuccessNotificationForUnstableBuild(boolean isUnstableBuildSuccess) Defines behaviour of unstable builds in Bitbucket.- Parameters:
isUnstableBuildSuccess-trueto consider unstable builds successful when notifying Bitbucket.- Returns:
thisfor method chaining.
-
withSendStoppedNotificationForAbortBuild
@NonNull public final BitbucketSCMSourceContext withSendStoppedNotificationForAbortBuild(boolean sendStopped) Defines behaviour of unstable builds in Bitbucket.- Parameters:
sendStopped-trueto consider aborted builds as stopped when notifying Bitbucket.- Returns:
thisfor method chaining.
-
withSendStopNotificationForNotBuildJobs
@NonNull public final BitbucketSCMSourceContext withSendStopNotificationForNotBuildJobs(boolean sendStopped) Defines behaviour of not-built jobs in Bitbucket.- Parameters:
sendStopped-falseto consider aborted builds as stopped when notifying Bitbucket.- Returns:
thisfor method chaining.
-
withUseReadableNotificationIds
public final BitbucketSCMSourceContext withUseReadableNotificationIds(boolean useReadableNotificationIds) -
newRequest
@NonNull public BitbucketSCMSourceRequest newRequest(@NonNull jenkins.scm.api.SCMSource scmSource, TaskListener taskListener) - Specified by:
newRequestin classjenkins.scm.api.trait.SCMSourceContext<BitbucketSCMSourceContext,BitbucketSCMSourceRequest>
-