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

Perform tagging also on unstable builds

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: svn-tag-plugin
    • Labels:
      None
    • Environment:
      Platform: All, OS: All
    • Similar Issues:

      Description

      It would be nice to make tags also on unstable builds.
      In my project currently some test cases fail which means the build is marked as
      unstable but never the less I want to make snap shots of my build.

      So best would be to make it configureable which build status should be tagged.

        Attachments

          Activity

          Hide
          manuel_steurer Manuel Steurer added a comment -

          Also, if my last build was unstable and I'm adding 'lastSuccessfulBuild' to my job-url, I get this unstable build with a yellow ball. If I'm using 'lastStableBuild', I get an earlier build with a blue ball.

          Show
          manuel_steurer Manuel Steurer added a comment - Also, if my last build was unstable and I'm adding 'lastSuccessfulBuild' to my job-url, I get this unstable build with a yellow ball. If I'm using 'lastStableBuild', I get an earlier build with a blue ball.
          Hide
          manuel_steurer Manuel Steurer added a comment - - edited

          I would consider the current behaviour to be a bug, the jenkins wiki at https://wiki.jenkins-ci.org/display/JENKINS/Terminology says:

          Unstable build: A build is unstable if it was built successfully and one or more publishers report it unstable. For example if the JUnit publisher is configured and a test fails then the build will be marked unstable.

          Successful build: A build is successful when the compilation reported no errors.

          As I understand this, unstable builds are also always successful builds. So the svn-tagging plugin should by definition tag unstable builds. Since it claims on https://wiki.jenkins-ci.org/display/JENKINS/Subversion+Tagging+Plugin

          What does this do?
          This plugin automatically performs subversion tagging (technically speaking svn copy) on successful build.

          Show
          manuel_steurer Manuel Steurer added a comment - - edited I would consider the current behaviour to be a bug, the jenkins wiki at https://wiki.jenkins-ci.org/display/JENKINS/Terminology says: Unstable build: A build is unstable if it was built successfully and one or more publishers report it unstable. For example if the JUnit publisher is configured and a test fails then the build will be marked unstable. Successful build: A build is successful when the compilation reported no errors. As I understand this, unstable builds are also always successful builds. So the svn-tagging plugin should by definition tag unstable builds. Since it claims on https://wiki.jenkins-ci.org/display/JENKINS/Subversion+Tagging+Plugin What does this do? This plugin automatically performs subversion tagging (technically speaking svn copy) on successful build.
          Hide
          k2nakamura k2nakamura added a comment -

          Hi,

          Thank you for the enhancement idea and I'd love to add the feature, but it may not be the hightest priority. I'll lower the priority and it would be nice if you can send me the patch containing GUI modifications as well as the diff above so I can merge to the code.

          Show
          k2nakamura k2nakamura added a comment - Hi, Thank you for the enhancement idea and I'd love to add the feature, but it may not be the hightest priority. I'll lower the priority and it would be nice if you can send me the patch containing GUI modifications as well as the diff above so I can merge to the code.
          Hide
          lumpi82 lumpi82 added a comment -

          You can use:

          Index: src/main/java/hudson/plugins/svn_tag/SvnTagPlugin.java
          ===================================================================
          — src/main/java/hudson/plugins/svn_tag/SvnTagPlugin.java (revision 21844)
          +++ src/main/java/hudson/plugins/svn_tag/SvnTagPlugin.java (working copy)
          @@ -70,7 +70,8 @@
          String tagBaseURLStr, String tagComment) {
          PrintStream logger = buildListener.getLogger();

          • if (!Result.SUCCESS.equals(abstractBuild.getResult())) {
            + if (Result.FAILURE.equals(abstractBuild.getResult()) ||
            + Result.ABORTED.equals(abstractBuild.getResult())) {
            logger.println("No Subversion tagging for unsuccessful build. ");

          return true;

          Show
          lumpi82 lumpi82 added a comment - You can use: Index: src/main/java/hudson/plugins/svn_tag/SvnTagPlugin.java =================================================================== — src/main/java/hudson/plugins/svn_tag/SvnTagPlugin.java (revision 21844) +++ src/main/java/hudson/plugins/svn_tag/SvnTagPlugin.java (working copy) @@ -70,7 +70,8 @@ String tagBaseURLStr, String tagComment) { PrintStream logger = buildListener.getLogger(); if (!Result.SUCCESS.equals(abstractBuild.getResult())) { + if (Result.FAILURE.equals(abstractBuild.getResult()) || + Result.ABORTED.equals(abstractBuild.getResult())) { logger.println("No Subversion tagging for unsuccessful build. "); return true;

            People

            • Assignee:
              k2nakamura k2nakamura
              Reporter:
              lumpi82 lumpi82
            • Votes:
              3 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: