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

Maven2 project build wrapper sees build status of null rather than Aborted

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core, maven-plugin
    • None
    • Hudson 1.383
      Hudson M2 Extra Steps Plugin 1.1.3
      Hudson Groovy builder 1.4

      If you cancel a running build for a maven2 project, build wrappers see a build status of null rather than Aborted. This causes the m2-extra-steps plugin to run post-build steps that are marked "Run only if build succeeds" even when you cancel a build.

      I'm attaching a sample project I used to test this. The pom just invokes sleep for 20 seconds so it is easy to cancel it in-flight. The project uses m2-extra-steps to do two things:

      1. Invoke a groovy script to print the current status of the current build - in my testing this printed null for the current build status.
      2. Invoke another mvn goal just to see m2-extra-steps run.

      Since the extra-steps are "Run only if build succeeds" I would expect them not to run when a build is canceled, but they do run as shown in the attached build log.

        1. config.xml
          2 kB
        2. log
          3 kB
        3. pom.xml
          1 kB

          [JENKINS-8054] Maven2 project build wrapper sees build status of null rather than Aborted

          Nathan Parry created issue -
          Nathan Parry made changes -
          Link New: This issue is related to JENKINS-7864 [ JENKINS-7864 ]
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Kohsuke Kawaguchi made changes -
          Link New: This issue is duplicated by JENKINS-7864 [ JENKINS-7864 ]
          Nathan Parry made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]
          Jenkins IRC Bot made changes -
          Component/s New: maven-plugin [ 16033 ]
          Component/s Original: maven2 [ 15487 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 138157 ] New: JNJira + In-Review [ 204696 ]

            Unassigned Unassigned
            nparry Nathan Parry
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: