即使作业成功,带有 PTC Integrity 插件的 Jenkins Build Flow 插件也会失败

Jenkins Build Flow plugin with PTC Integrity plugin fails even if jobs are successfull

我们有以下环境

Jenkins cloudbees 版本。 1.554.2.2

build-flow-plugin 版本 0.10

完整性插件版本 1.17 (SCM)

我们创建了一个构建流程作业,它执行

parallel (
{ 
 build("Job-A" , Variant:params.Variant)
 build("Job-B" , Variant:params.Variant)
 build("Job-C" , Variant:params.Variant)
},
 {build("Job-D" , Variant:params.Variant , Environment:params.Environment)},
 {build("Job-E" , Variant:params.Variant)},
 {build("Job-F" , Variant:params.Variant)},
 {build("Job-G" , Variant:params.Variant , Environment:params.Environment)},
 {build("Job-H" , Variant:params.Variant)},
 {build("Job-I" , Variant:params.Variant)}
)

语法看起来不错,所有作业都已执行。执行时,我看到以下状态,

Started by timer
Building remotely on d-xxxx999 (windows) in workspace     e:\workspace\Job_1234601\Job-All-Projects
parallel {
    Schedule job Job_1234601 » Job-D
    Schedule job Job_1234601 » Job-A
    Schedule job Job_1234601 » Job-F
    Schedule job Job_1234601 » Job-H
    Schedule job Job_1234601 » Job-G
Schedule job Job_1234601 » Job-I
Build Job_1234601 » Job-A #90 started
Build Job_1234601 » Job-H #89 started
Build Job_1234601 » Job-F #89 started
Build Job_1234601 » Job-D #90 started
Build Job_1234601 » Job-I #89 started
Build Job_1234601 » Job-G #90 started
Job_1234601 » Job-I #89 completed 
Job_1234601 » Job-H #89 completed 
Job_1234601 » Job-F #89 completed 
Job_1234601 » Job-A #90 completed 
Schedule job Job_1234601 » Job-B
Job_1234601 » Job-G #90 completed 
Build Job_1234601 » Job-B #87 started
Job_1234601 » Job-B #87 completed 
Schedule job Job_1234601 » Job-C
Build Job_1234601 » Job-C #86 started
Job_1234601 » Job-D #90 completed 
Job_1234601 » Job-C #86 completed 
}
Sending e-mails to: admin@jenkins.test
Finished: FAILURE

*从输出中可以明显看出所有作业都已成功完成。 但是,我仍然看到最终结果是失败。

此外,我正在为许多应用程序构建使用构建流程插件,所有其他应用程序都工作正常。

总共为该应用程序配置了 5 个作业 variants/branches。

其中一个成功运行。即输出成功。

对于其他人,它给出了上述错误。 父级中的所有作业都配置了 PTC 插件。

在 jenkins 日志中我没有看到任何异常。*

有一个是PTC插件相关的,

Apr 06, 2016 6:53:11 AM [INFO] IntegritySCM - Failed to shutdown database connection!

Apr 06, 2016 6:53:11 AM [INFO] IntegritySCM - Database 'x/y/z/jobs/Job_1234601/jobs/Job-I/builds/2016-04-06_06-53-01/IntegritySCM' shutdown.

Apr 06, 2016 6:53:11 AM [INFO] IntegritySCM - java.sql.SQLNonTransientConnectionException: Database 'x/y/z/jobs/Job_1234601/jobs/Job-I/builds/2016-04-06_06-53-01/IntegritySCM' shutdown.

Apr 6, 2016 6:53:11 AM org.apache.commons.httpclient.HttpMethodBase readResponseBody

WARNING: Unsupported transfer encoding:

Apr 6, 2016 6:53:11 AM org.apache.commons.httpclient.HttpMethodBase readResponseBody

INFO: Response content is not chunk-encoded

INFO: Job_1234601 » Job-C #134 main build action completed: SUCCESS flow failed to complete : FAILURE

问题已解决。不幸的是 "Job-E" 是 DSL 中的拼写错误。 作业的实际名称是 "Job E".

修改后一切正常。

我想知道为什么 Build Flow 插件没有为不存在的作业引发任何错误。

我会举一个JIRA看看。