前一个作业成功完成后,如何在特定时间后执行Jenkins作业? [英] how to execute Jenkins job after specific time once the previous job completed successfully?

查看:368
本文介绍了前一个作业成功完成后,如何在特定时间后执行Jenkins作业?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个詹金斯工作,我想在第一个工作成功完成后(例如12小时后)触发第二个工作.我需要在一定时间后一次执行两个詹金斯工作,一次又一次基于成功完成第一份工作

I have two jenkins jobs , I want to trigger the second job after the successful completion of the first job say after 12 hours of time.I need to execute 2 Jenkins jobs after certain time one after the other based on successful completion of first job

推荐答案

您可以如下组合使用安静期构建后操作.

You can use combination of Quiet Period and Post build action as follows.

假设您要在作业A延迟1分钟后触发作业B.

Suppose You want to trigger Job B after Job A is done with delay of 1 minute.

然后在您的工作B中:

  1. 转到General标签
  2. 单击ADVANCED按钮
  3. 选中Quiet Period并输入60(= 1分钟)
  4. 保存
  1. Go to General tab
  2. Click on ADVANCED button
  3. Check Quiet Period and enter 60 (= 1 minute)
  4. Save

在您的职位A中: 1.去发布构建动作 2.选择构建其他项目

In you Job A: 1. Go to post build Action 2. Select Build other project

  1. Project to build中输入作业B,然后选择Trigger only if build is stable
  2. 保存
  1. Enter Job B in Project to build and select Trigger only if build is stable
  2. Save

这篇关于前一个作业成功完成后,如何在特定时间后执行Jenkins作业?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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