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

Post-build task fails if job is aborted

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • postbuild-task-plugin
    • None
    • Jenkins 1.466.1
      postbuild-task plugin 1.8

      Jenkins is running on a windows 2003 server
      In the job config postbuild task part:
      log text : .
      script : dir
      When the job is successed or failed, the postbuild task works fine

      When the job is aborted (manually stopped or timeout case) I get this kind of logs:
      Running script :dir
      [workspace] $ cmd /c call C:\Users\XXX\AppData\Local\Temp\2\hudson13287273761205392.bat
      Exception when executing the batch command : null
      Build step 'Post build task' marked build as failure
      Finished: ABORTED

      C:\Users\XXX\AppData\Local\Temp\2 is the java.io.tmpdir data

      I ran a non-stop script listing files in this folder, the temp script
      hudsonxxxxxxxx.bat is never written in this folder

      in the jenkins log I have a java exception generated each time a job is aborted :
      java.lang.InterruptedException
      at java.lang.ProcessImpl.waitFor(Native Method)
      at hudson.Proc$LocalProc.join(Proc.java:319)
      at hudson.Launcher$ProcStarter.join(Launcher.java:345)
      at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:82)
      at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:58)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:710)
      at hudson.model.Build$RunnerImpl.build(Build.java:178)
      at hudson.model.Build$RunnerImpl.doRun(Build.java:139)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:480)
      at hudson.model.Run.run(Run.java:1438)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:239)

      It is a main issue in my professional project.
      From my web research it appears that post build task is supposed to work fine even when the job is aborted

            Unassigned Unassigned
            willou william vilpoix
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: