First off, i found a better workaround. First go to the console screen for the job. click the abort button in upper right area. scroll to bottom and wait about 10 seconds. You will see a link allowing you to force kill the job.
Started At: 05-06-2016 20:00:08 Ended At: 05-06-2016 20:02:19 Build Lasted: 2 minutes 10 seconds Highest Error Code: 0 <hang here> Aborted by admin Sending interrupt signal to process Click here to forcibly terminate running steps Terminating bat [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline Finished: ABORTED
Unfortunately I'm seeing an almost 100% chance of hangs on my machine so still pretty useless.
-------------------------
I acquired Karing's code and tested it. it terminates my bat build steps after about 3-5 seconds no matter what the state is. I didnt dig too much into that.
I reverted to baseline and tried my suggestions. None of them work. In fact, i can't prove that the script call from jenkins-wrap.bat ever returns...
here is my current attempt at jenkins-wrap.bat: cmd /c ""...\jenkins-main.bat"" > "...\jenkins-log.txt" 2>&1 :retry echo writing jenkins.results >> "...\jenkins-log.txt" echo %ERRORLEVEL% > "...\jenkins-result.txt" if not exist "...\jenkins-result.txt" goto retry
It is supposed to jackhammer that results file until it is created. I see no "writing jenkins.results" in the logs, therefore the wrapper script is terminating early. The same thing happens if i replace cmd /c with call or start. (note: "..." is a placeholder for my real paths not some kind of relative path thing. sorry for confusion.)
|