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

Allow Post-Steps to run on failed/unstable builds

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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

        Attachments

          Activity

          Hide
          danielbeck Daniel Beck added a comment -

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

          Show
          danielbeck Daniel Beck added a comment - Could you be more specific at to what you're referring to?
          Hide
          sebastian_dietrich 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

          Show
          sebastian_dietrich 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
          Hide
          danielbeck Daniel Beck added a comment -

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

          Show
          danielbeck Daniel Beck added a comment - "Post steps" and the condition selection is specific to the Maven job type, and therefore the Maven plugin.
          Hide
          skirankumars 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.

          Show
          skirankumars 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.

            People

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

              Dates

              Created:
              Updated: