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

Add option to only show latest build status for each commit

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The build key uses the build number, so if things go wrong in a build environment that aren't related to the code itself, the overall commit is marked as failed, even if subsequent builds pass.

      An option such as "Only show latest build status for each commit" that if toggled excludes the build number from the build key would allow commits to be rebuilt upon error.

      Bitbucket has done a write up on this problem - Commit build status is always red even if other builds succeed

      It looks like it may be simply updating BitbucketBuildStatusNotifier.java:299 to exclude the number if the configuration option is on.

        Attachments

          Activity

          Hide
          flagbit Antonio Mansilla added a comment -

          The functionality was implemented and will be available in the next plugin release.

          Show
          flagbit Antonio Mansilla added a comment - The functionality was implemented and will be available in the next plugin release.
          Hide
          mydisconnect Andrius Versockas added a comment -

          It seems this issue was not resolved, tried this with the latest version and the build status would stay failed in Bitbucket.
          Test case flow:

          1. Launch a pipeline job for any branch (FAILED):

          bitbucketStatusNotify( buildState: 'FAILED', buildKey: "batman", buildName: "batman", buildDescription: 'Something went wrong with build!', repoSlug: "${env.REPO_SLUG}", commitId: "${env.GIT_COMMIT_FULL}" )
          

          2. Launch the job for the same branch with (SUCCESSFUL):

          bitbucketStatusNotify( buildState: 'SUCCESSFUL', buildKey: "batman", buildName: "batman", buildDescription: 'Something went wrong with build!', repoSlug: "${env.REPO_SLUG}", commitId: "${env.GIT_COMMIT_FULL}" )
          

          3. The Bitbucket Cloud UI shows that the branch build has failed (Inside 1 successful and 1 failed)

          Show
          mydisconnect Andrius Versockas added a comment - It seems this issue was not resolved, tried this with the latest version and the build status would stay failed in Bitbucket. Test case flow: 1. Launch a pipeline job for any branch (FAILED): bitbucketStatusNotify( buildState: 'FAILED' , buildKey: "batman" , buildName: "batman" , buildDescription: 'Something went wrong with build!' , repoSlug: "${env.REPO_SLUG}" , commitId: "${env.GIT_COMMIT_FULL}" ) 2. Launch the job for the same branch with (SUCCESSFUL): bitbucketStatusNotify( buildState: 'SUCCESSFUL' , buildKey: "batman" , buildName: "batman" , buildDescription: 'Something went wrong with build!' , repoSlug: "${env.REPO_SLUG}" , commitId: "${env.GIT_COMMIT_FULL}" ) 3. The Bitbucket Cloud UI shows that the branch build has failed (Inside 1 successful and 1 failed)
          Hide
          psy_kiran Sai Kiran added a comment - - edited

          Antonio MansillaI am using your Plugin for last 6 months, It is a great feature. But Soon as I moved to Pipeline I am having Trouble
          1. There is no option to implement to show only the latest Builds On PR Builds sections, It shows All Builds Failure & Success Both.
          2. Bitbucket Has released a new check for PR's, "1 successful build on last commit" if we have any history of Failed Builds he doesn't allow the author to merge.
          in this case admin must be present every time to merge a PR & vice-versa with this PR check also "No failed builds on last commit".

          It would be a great help if you give the "only Show Latest build" option with pipeline also, It will be a great help.

          Show
          psy_kiran Sai Kiran added a comment - - edited Antonio Mansilla I am using your Plugin for last 6 months, It is a great feature. But Soon as I moved to Pipeline I am having Trouble 1. There is no option to implement to show only the latest Builds On PR Builds sections, It shows All Builds Failure & Success Both. 2. Bitbucket Has released a new check for PR's, "1 successful build on last commit" if we have any history of Failed Builds he doesn't allow the author to merge. in this case admin must be present every time to merge a PR & vice-versa with this PR check also "No failed builds on last commit". It would be a great help if you give the "only Show Latest build" option with pipeline also, It will be a great help.

            People

            Assignee:
            flagbit Antonio Mansilla
            Reporter:
            kurt_wagner Kurt
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated: