简体   繁体   English

jenkins:从 gerrit 事件开始连续启动两个工作

[英]jenkins: Start two jobs consecutively from gerrit event

I would like to execute two jobs separetly with prioriry order on the same gerrit event.我想在同一个 gerrit 事件上按优先顺序分别执行两个作业。

My constraints are:我的限制是:

  • Job 1 start and finish.作业 1 开始和结束。
  • Job 2 must start after the job 1 with the same gerrit event.作业 2 必须在具有相同 gerrit 事件的作业 1 之后开始。

I enabled in job 2:我在工作 2 中启用:

  • Build after other projects are built在其他项目构建后构建
  • Gerrit event格里特事件

But the GERRIT_REFNAME is empty in job 2.但 GERRIT_REFNAME 在作业 2 中为空。

How can I proceed ?我该如何继续?

Do the following:请执行下列操作:

Job 1工作 1

Use "Trigger parameterized build on other projects" to start Job2 at the end.最后使用“Trigger parameterized build on other projects”启动Job2。 Do not forget to add the "Current build parameters" option.不要忘记添加“当前构建参数”选项。

在此处输入图片说明

Job 2工作 2

Remove the "Gerrit event" trigger option.删除“Gerrit 事件”触发器选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM