1

I have a waterfall model of jobs sequence in Jenkins.

Is there a way to link the build numbers and status of the child job to the main job to get overall status.

eg:

  • Project 1 was executed with Build Number 100 and passed
  • Project 2 was executed with Build Number 200 from Project 1 and Passed.
  • Project 3 was executed with Build Number 300 from Project 2 and Failed.

so the overall status for Project 1 with Build # 100 is failed.

4

1 回答 1

0

你可以试试 Multi-Job 插件:https ://wiki.jenkins-ci.org/display/JENKINS/Multijob+Plugin

您需要定义一个多作业视图。在多作业视图中,您可以有构建阶段、测试阶段等阶段。每个阶段都可以有一个或多个作业。

如果阶段内的任何作业失败,则启动构建也会失败:

多作业插件使用

另一种方法:如果您不想将启动作业标记为失败并且仍需要将其标记为“好”或“坏”构建,您还可以查看Promoted Build 插件: https://wiki.jenkins-ci。 org/display/JENKINS/Promoted+Builds+Plugin

例如,在您的示例中,项目 1 启动并触发项目 2、项目 3。只有在项目 2 和项目 3 已通过时,您才能将项目 1 标记为“金星”。您甚至可以在促销时采取一些行动。

希望这可以帮助。

于 2015-01-15T09:28:44.787 回答