Class RequiredBuildNotifier

All Implemented Interfaces:
ExtensionPoint, Describable<Publisher>, BuildStep, SimpleBuildStep

public class RequiredBuildNotifier extends StashNotifier
Notifies Bitbucket using the repository build status API required by the Required Builds merge check.
  • Constructor Details

    • RequiredBuildNotifier

      @DataBoundConstructor public RequiredBuildNotifier(String bitbucketProjectKey, String repositorySlug)
  • Method Details

    • getBitbucketProjectKey

      public String getBitbucketProjectKey()
    • getRepositorySlug

      public String getRepositorySlug()
    • getBuildKey

      public String getBuildKey()
    • setBuildKey

      @DataBoundSetter public void setBuildKey(String buildKey)
    • setProjectKey

      public void setProjectKey(String projectKey)
      Overrides:
      setProjectKey in class StashNotifier
    • createBuildStatusUri

      protected URI createBuildStatusUri(String stashURL, String commitSha1, Run<?,?> run, TaskListener listener)
      Overrides:
      createBuildStatusUri in class StashNotifier
    • createNotificationPayload

      protected net.sf.json.JSONObject createNotificationPayload(Run<?,?> run, StashBuildState state, TaskListener listener)
      Description copied from class: StashNotifier
      Returns the HTTP POST entity body with the JSON representation of the run result to be sent to the Bitbucket build API.
      Overrides:
      createNotificationPayload in class StashNotifier
      Parameters:
      run - the run to notify Bitbucket of
      Returns:
      JSON body for POST to Bitbucket build API