新版本开始时,应该中止该版本。因此,在某些情况下,构建可能会很快中止(在签出操作期间未签出管道代码)。该构建的状态是“失败”而不是“中止”。
没有多个分支管道的后期处理。而且我没有找到任何可以更改构建状态的api。
日志如下:
Started by user Leo
> git rev-parse --is-inside-work-tree # timeout=10
Setting origin to https://eos2git.cec.lab.emc.com/xxx/xxx.git
> git config remote.origin.url https://eos2git.cec.lab.emc.com/xxx/xxx.git # timeout=10
Fetching origin...
Fetching upstream changes from origin
> git --version # timeout=10
using GIT_ASKPASS to set credentials PASSWORD IS TOKEN
> git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/*
java.lang.InterruptedException
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:502)
at java.lang.UNIXProcess.waitFor(UNIXProcess.java:395)
at hudson.Proc$LocalProc.join(Proc.java:324)
at hudson.Proc.joinWithTimeout(Proc.java:170)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1992)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1715)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:72)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:405)
at jenkins.plugins.git.AbstractGitSCMSource.doRetrieve(AbstractGitSCMSource.java:351)
at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:373)
at jenkins.scm.api.SCMSource.fetch(SCMSource.java:564)
at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:95)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:295)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Finished: FAILURE
如何使中止的管道构建始终处于“中止”结果状态。 如果管道脚本开始处理,然后中止构建,则结果将“中止”。但是,当构建正在检出代码时,不会启动管道脚本,然后中止构建,构建结果将为“失败”。