在詹金斯手动批准后开始工作 [英] Kick off a job after manual approval in jenkins

查看:118
本文介绍了在詹金斯手动批准后开始工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在作业A成功执行后,我需要对作业B进行分类. 作业A成功执行后,将向审批者发送电子邮件通知.批准人将收到一封电子邮件,然后单击邮件链接.他将被带到Jenkins页面,在该页面中,他将批准执行Job B.

I have a requirement of trigerring a Job B after Job A executes successfully. After Job A executes successfully , an email notification will be sent to the approver . The approver will receive an email and click on the mail link . He will be routed to Jenkins page where he will approve the execution of Job B .

我不确定要使用哪个插件来提及批准人的名字,批准人如何单击链接并在登录Jenkins页面后简单地说批准".

I am not sure which plugin to use where I can mention the name of the approver , how the approver can click on the link and simple say "approve" after logging in to the Jenkins page.

推荐答案

  • 设置Job A
  • 配置Job A以将电子邮件发送到您的批准者",作为Email Ext构建后操作的一部分
  • 配置电子邮件以包含返回到作业运行的链接(不仅仅是作业名称,或者甚至可以直接从电子邮件链接到升迁)
  • Job A上配置 促销 . /li>
  • 在该促销活动中,仅允许您的批准者"用户(按名称)运行
  • 配置该促销以触发Job B
    • Setup Job A
    • Configure Job A to send email to your "approver" as part of Email Ext post-build action
    • Configure the email to contain link back to the job run (not just job name, or you could even link directly to promotion from the email)
    • Configure a Promotion on Job A
    • In that promotion, allow it to be run only by your "approver" user (by name)
    • Configure that promotion to trigger Job B
    • 运行Job A时,它将发送电子邮件到批准者".他/她将单击链接并进入Jenkins作业运行UI.他/她应该使用其批准者"用户登录到Jenkins.

      When Job A is run, it will send email to "approver". He/she will click the link and come to the Jenkins job run UI. He/she should be logged in to Jenkins with their "approver" user.

      然后,他/她可以单击促销星,然后单击其上的批准"即可.这将触发促销,进而触发Job B

      Then he/she can click the promotion star and simply click "approve" on it. This will trigger the promotion which in turn triggers Job B

      注意:没有促销"插件,您可以实现类似的目的,但这正是该插件存在的原因,因此,请使用它.

      Note: you can achieve something similar without "Promotions" plugin, but this is exactly the reason why that plugin exists, so use it.

      这篇关于在詹金斯手动批准后开始工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆