我正在尝试配置jenkins重新安排作业,如果作业失败,因为它运行的从属设备已经死亡(网络问题,电源问题等)。
我的jenkins有一个父(管道)作业,可以调用许多子构建作业。当我在运行作业时手动断开从属设备上的网络电缆时,构建作业未标记为失败/中止至少15分钟的问题。我已经在Build Enivronment中的“中止构建,如果它被卡住了”下手动将超时设置为3分钟,但此时没有任何反应(时间戳:12:37)。我如何确保詹金斯能够快速确定奴隶何时死亡,而不是等待目前正在做的15-20分钟。您可以在我的虚拟作业上看到时间戳,它只打印“Hello”消息:
12:34:32 + '[' 35 -gt 0 ']'
12:34:32 + echo HELLO
12:34:32 HELLO
12:34:32 + echo -ne '35\033[0K]\r'
12:34:32 3leep 1
12:34:33 + : 35
12:34:33 + '[' 34 -gt 0 ']'
12:34:33 + echo HELLO
12:34:33 HELLO
12:34:33 + echo -ne '34\033[0K]\r'
12:34:33 3leep 1
12:37:16 Build timed out (after 3 minutes). Marking the build as aborted.
12:51:52 FATAL: Unable to delete script file /var/folders/2k/2w2rvnys0hd1b105qxkb1_jh0000gr/T/hudson3917701081327223846.sh
12:51:52 java.io.EOFException
12:51:52 at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2624)
12:51:52 at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:3099)
12:51:52 at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:853)
12:51:52 at java.io.ObjectInputStream.<init>(ObjectInputStream.java:349)
12:51:52 at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:48)
12:51:52 at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:34)
12:51:52 at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:59)
12:51:52 Caused: java.io.IOException: Unexpected termination of the channel
12:51:52 at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:73)
12:51:52 Caused: hudson.remoting.RequestAbortedException
12:51:52 at hudson.remoting.Request.abort(Request.java:307)
12:51:52 at hudson.remoting.Channel.terminate(Channel.java:896)
12:51:52 at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:92)
12:51:52 at ......remote call to abishnoi3(Native Method)
12:51:52 at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1545)
12:51:52 at hudson.remoting.Request.call(Request.java:172)
12:51:52 at hudson.remoting.Channel.call(Channel.java:829)
12:51:52 at hudson.FilePath.act(FilePath.java:985)
12:51:52 at hudson.FilePath.act(FilePath.java:974)
12:51:52 at hudson.FilePath.delete(FilePath.java:1425)
12:51:52 at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:123)
12:51:52 at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:66)
12:51:52 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
12:51:52 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
12:51:52 at hudson.model.Build$BuildExecution.build(Build.java:206)
12:51:52 at hudson.model.Build$BuildExecution.doRun(Build.java:163)
12:51:52 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
12:51:52 at hudson.model.Run.execute(Run.java:1728)
12:51:52 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
12:51:52 at hudson.model.ResourceController.execute(ResourceController.java:98)
12:51:52 at hudson.model.Executor.run(Executor.java:405)
12:51:52 Build was aborted
12:51:52 Calling Pipeline was cancelled
12:51:52 [BFA] Scanning build for known causes...
12:51:52 [BFA] No failure causes found
12:51:52 [BFA] Done. 0s
12:51:52 Finished: ABORTED