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

Allow Post-Steps to run on failed/unstable builds

      Currently a post-step can only be run *) if build succeeds *) if build succeeds or is unstable or *) regardless of build result

      Please provide a 4th option *) if build is unstable

      This will make it possible to e.g. run cleanup tasks if a build became instable
      e.g. we run a quick maven build only with test goal, if that fails we would like to run a maven build with clean test goal

          [JENKINS-22677] Allow Post-Steps to run on failed/unstable builds

          Daniel Beck added a comment -

          Could you be more specific at to what you're referring to?

          Daniel Beck added a comment - Could you be more specific at to what you're referring to?

          In Jenkins when defining a build, one can define post-build-steps. This is done in /configure, the section is called "Post Steps". There one can select the following options:

          • Run only if build succeeds
          • Run only if build succeeds or is unstable
          • Run regardless of build result

          I'd like to run a post step, when the build does not succeed. In my specific case I want to run a maven build with "mvn test" and only upon failure a build with "mvn clean test".

          That is why I need a 4th option * Run only if build is unstable

          sebastian_dietrich added a comment - In Jenkins when defining a build, one can define post-build-steps. This is done in /configure, the section is called "Post Steps". There one can select the following options: Run only if build succeeds Run only if build succeeds or is unstable Run regardless of build result I'd like to run a post step, when the build does not succeed. In my specific case I want to run a maven build with "mvn test" and only upon failure a build with "mvn clean test". That is why I need a 4th option * Run only if build is unstable

          Daniel Beck added a comment -

          "Post steps" and the condition selection is specific to the Maven job type, and therefore the Maven plugin.

          Daniel Beck added a comment - "Post steps" and the condition selection is specific to the Maven job type, and therefore the Maven plugin.

          Kiran Sukumar added a comment -

          Im currently using the JIRA plugin in jenkins which would update the jira status workflow. If the build would fail it would be great if i can update jira status as failed. I think its necessary to have this option to do that.

          Kiran Sukumar added a comment - Im currently using the JIRA plugin in jenkins which would update the jira status workflow. If the build would fail it would be great if i can update jira status as failed. I think its necessary to have this option to do that.

            Unassigned Unassigned
            sebastian_dietrich sebastian_dietrich
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: