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

Postbuild Steps for 'Success' still execute when using shell step's unstable return

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Excerpt from console

      16:04:22 [release_common_ui-Merge-DSL] $ /bin/bash -xe /tmp/jenkins8569034272109787227.sh
      16:04:22 + cd /home/acme/workspace/release_common_ui-Merge-DSL/
      16:04:22 + git merge-base --is-ancestor 0714360322bd5bdfa159e1df005fa0f2f6bd7b41 HEAD
      16:04:22 + set +x
      16:04:22 [WARNING] Already up to date.
      16:04:22 + exit 2
      16:04:22 Build step 'Execute shell' changed build result to UNSTABLE
      ....
      16:04:30 [INFO] ------------------------------------------------------------------------
      16:04:30 [INFO] BUILD SUCCESS
      16:04:30 [INFO] ------------------------------------------------------------------------
      16:04:30 [INFO] Total time: 4.313 s
      16:04:30 [INFO] Finished at: 2017-10-24T16:06:41+00:00
      16:04:30 [INFO] Final Memory: 24M/303M
      16:04:30 [INFO] ------------------------------------------------------------------------
      16:04:30 [JENKINS] Archiving /home/acme/workspace/release_common_ui-Merge-DSL/pom.xml to com.acme/common_ui/41.0.0-SNAPSHOT/common_ui-41.0.0-SNAPSHOT.pom
      16:04:30 channel stopped
      16:04:30 [release_common_ui-Merge-DSL] $ /bin/bash -xe /tmp/jenkins2230925865594967977.sh
      16:04:30 + cd /home/acme/workspace/release_common_ui-Merge-DSL/
      16:04:30 + git push --set-upstream origin release
      16:04:32 Everything up-to-date
      16:04:40 Build was aborted
      16:04:40 Aborted by jbochenski
      

      and the config XML:

      <runPostStepsIfResult><name>SUCCESS</name><ordinal>0</ordinal><color>BLUE</color><completeBuild>true</completeBuild></runPostStepsIfResult><postbuilders><hudson.tasks.Shell><command>cd $WORKSPACE/
                                                          git push --set-upstream origin release
                                                          </command></hudson.tasks.Shell>
      

      Fun fact: I'm pushing in a shell because it's (was?) a workaround for JENKINS-16646

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jbochenski Jakub Bochenski
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: