Jenkins 立即中止多分支作业,结果将失败
新生成开始时,应中止生成。因此,在某些情况下,生成可能会很快中止(在签出操作期间,管道代码没有签出)。该生成的状态为“失败”,而不是预期的“中止” 没有多分支管道的后期操作。我没有找到任何api来更改构建状态 日志如下所示:Jenkins 立即中止多分支作业,结果将失败,jenkins,jenkins-pipeline,Jenkins,Jenkins Pipeline,新生成开始时,应中止生成。因此,在某些情况下,生成可能会很快中止(在签出操作期间,管道代码没有签出)。该生成的状态为“失败”,而不是预期的“中止” 没有多分支管道的后期操作。我没有找到任何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
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
如何使中止的管道生成始终具有“中止”结果状态。
如果管道脚本开始处理,然后中止生成,则结果将为“中止”。但是,当生成签出代码时,管道脚本不会启动,然后中止生成,生成结果将是“失败”。可能重复的