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

Why the Post Steps and Post-build Actions are not executed after the build finished

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • postbuild-task-plugin
    • None
    • Windows

      My question is that The log file is in whole or in part when executed "post step" or "Post-build Actions". How to get the build result.

      I want to get the build result,but there are no any plugins to get the result.So I did below this:

      1 In my opinion,the "post step" are executed after the build finished. So I cofigured the job and selected "Run regardless of build result" at "post step" ,at the same time there is one bat at "execute windows at batch command".
      The bat is used to query the two files "build.xml" and "log". But I can not find the string "<result>FAILURE</result>" in the "build.xml" and "Finished: FAILURE" in the file "log".
      When the build finished,I queried these 2 files on the disk,the strings are exists in the two file.

      2 I installed one plugin "Post build task" below "Post-build Actions",I put the string "FAILURE" into the Log text. but the Script did not executed.

          [JENKINS-12793] Why the Post Steps and Post-build Actions are not executed after the build finished

          dzy dzy added a comment -

          the title is "Why Post Steps and Post-build Actions are not executed after the build finished"

          dzy dzy added a comment - the title is "Why Post Steps and Post-build Actions are not executed after the build finished"

          dzy dzy added a comment -

          I tested the job which is builded failure.

          dzy dzy added a comment - I tested the job which is builded failure.

          Ulli Hafner added a comment -

          Wrong component.

          Ulli Hafner added a comment - Wrong component.

          Lars Kruse added a comment -

          A few ideas:

          Are you absolutely sure that you are using the same credentials when you test it (the service account you use for Jenkins), as you do when you run in a Jenkins job?

          Try to run the command …set in your script it in both test and jenkins. It will list alle environmenr variables. What differs?

          You could also try to redirect ERROUT into STDOUT using 2>&1 so you are sure you capture all the innformation you need.

          Lars Kruse added a comment - A few ideas: Are you absolutely sure that you are using the same credentials when you test it (the service account you use for Jenkins), as you do when you run in a Jenkins job? Try to run the command … set in your script it in both test and jenkins. It will list alle environmenr variables. What differs? You could also try to redirect ERROUT into STDOUT using 2>&1 so you are sure you capture all the innformation you need.

          I got the same problem. I put Log text "FAILURE" but it does not fire on failure build. Its found ERROR log text but not "Finished: FAILURE"

          Artur Karapetov added a comment - I got the same problem. I put Log text "FAILURE" but it does not fire on failure build. Its found ERROR log text but not "Finished: FAILURE"

          Even i am facing the same issue. Log text does not match with the build log

          Priyanka Marthi added a comment - Even i am facing the same issue. Log text does not match with the build log

            Unassigned Unassigned
            dzyjl dzy dzy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: