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 Details

    • BitbucketSCMSourceContext

      public BitbucketSCMSourceContext(@CheckForNull jenkins.scm.api.SCMSourceCriteria criteria, @NonNull jenkins.scm.api.SCMHeadObserver observer)
      Constructor.
      Parameters:
      criteria - (optional) criteria.
      observer - the SCMHeadObserver.
  • Method Details

    • wantBranches

      public final boolean wantBranches()
      Returns true if the BitbucketSCMSourceRequest will need information about branches.
      Returns:
      true if the BitbucketSCMSourceRequest will need information about branches.
    • wantTags

      public final boolean wantTags()
      Returns true if the BitbucketSCMSourceRequest will need information about tags.
      Returns:
      true if the BitbucketSCMSourceRequest will need information about tags.
    • wantPRs

      public final boolean wantPRs()
      Returns true if the BitbucketSCMSourceRequest will need information about pull requests.
      Returns:
      true if the BitbucketSCMSourceRequest will need information about pull requests.
    • wantOriginPRs

      public final boolean wantOriginPRs()
      Returns true if the BitbucketSCMSourceRequest will need information about origin pull requests.
      Returns:
      true if the BitbucketSCMSourceRequest will need information about origin pull requests.
    • wantForkPRs

      public final boolean wantForkPRs()
      Returns true if the BitbucketSCMSourceRequest will need information about fork pull requests.
      Returns:
      true if the BitbucketSCMSourceRequest will need information about fork pull requests.
    • skipPublicPRs

      public final boolean skipPublicPRs()
      Returns true 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 of ChangeRequestCheckoutStrategy 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 of ChangeRequestCheckoutStrategy 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 the WebhookRegistration mode.
      Returns:
      the WebhookRegistration mode.
    • webhookConfiguration

      @NonNull public final WebhookConfiguration webhookConfiguration()
      Returns the WebhookConfiguration configuration.
      Returns:
      the WebhookConfiguration configuration.
    • notificationsDisabled

      public final boolean notificationsDisabled()
      Returns true if notifications should be disabled.
      Returns:
      true if notifications should be disabled.
    • sendSuccessNotificationForUnstableBuild

      public final boolean sendSuccessNotificationForUnstableBuild()
      Returns true 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()
      Returns false 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 any BitbucketSCMSourceRequest for this context.
      Parameters:
      include - true to add the requirement or false 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 any BitbucketSCMSourceRequest for this context.
      Parameters:
      include - true to add the requirement or false 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 any BitbucketSCMSourceRequest for this context.
      Parameters:
      include - true to add the requirement or false 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 any BitbucketSCMSourceRequest for this context.
      Parameters:
      include - true to add the requirement or false 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 the ChangeRequestCheckoutStrategy 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 the ChangeRequestCheckoutStrategy 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 the WebhookRegistration 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 the WebhookRegistration 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 class jenkins.scm.api.trait.SCMSourceContext<BitbucketSCMSourceContext,BitbucketSCMSourceRequest>