Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-40998

Support for override Latest Build option with pipeline builds

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Same as JENKINS-35083 for pipelines.

      The code to fix should be straight forward to address.

      Update BitbucketBuildStatusNotifierStep.java
      add a new variable for the override Latest Build.

      private boolean overrideLatestBuild;
          public boolean isOverrideLatestBuild() { return this.overrideLatestBuild; }
          @DataBoundSetter public void setOverrideLatestBuild(boolean overrideLatestBuild) {
              this.overrideLatestBuild = overrideLatestBuild;
      
      }
      

      then in the run method

      reference isOverideLatestBuild instead of passing in false

      BitbucketBuildStatusHelper.notifyBuildStatus(step.getCredentials(build), step.isOverideLatestBuild(), build, taskListener, buildStatus);
      

        Attachments

          Activity

          Hide
          alex_juarez Alex Juarez added a comment -

          This should be a very localized change in BitbucketBuildStatusNotifierStep.java where a new DataBound setter should be added to obtain the user-provided value for the override flag. this flag should then be used when getting the build key to use when notifying BitBucket.

          Show
          alex_juarez Alex Juarez added a comment - This should be a very localized change in BitbucketBuildStatusNotifierStep.java where a new DataBound setter should be added to obtain the user-provided value for the override flag. this flag should then be used when getting the build key to use when notifying BitBucket.
          Hide
          markl_lagendijk Mark Lagendijk added a comment -

          I created an alternative pull request for this: https://github.com/jenkinsci/bitbucket-build-status-notifier-plugin/pull/42.
          I think this fix is better because it stays closer to the actual Bitbucket API.

          Show
          markl_lagendijk Mark Lagendijk added a comment - I created an alternative pull request for this: https://github.com/jenkinsci/bitbucket-build-status-notifier-plugin/pull/42 . I think this fix is better because it stays closer to the actual Bitbucket API.

            People

            Assignee:
            alex_juarez Alex Juarez
            Reporter:
            jmontanari joseph montanari
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated: