在特定阶段触发詹金斯管道 [英] Triggers on specific stage Jenkins Pipeline

查看:77
本文介绍了在特定阶段触发詹金斯管道的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从现在开始,我一直在使用Jenkins,但是我想做些事情,但找不到方法...

I'm using Jenkins since a little moment now, but I wanted to do something and I can't find how to do it...

实际上,我想以两种不同的方式触发我的项目:每4小时和每次提交. 但是对于每种情况,我都不希望我的所有Jenkinsfile仅在某些特定阶段执行.

In deed, I want to trigger my projects with two differents way: every 4 hours and for every commit. But for each case, I don't want that all my Jenkinsfile is executed, only some specific stages.

是否可以使用声明性管道做到这一点?

Is it possible to do that with Declarative Pipelines ?

预先感谢

推荐答案

不幸的是,此功能尚未提供. Cloudbees有一个称为"checkpoints"的专有插件,可以做到这一点,

Unfortunately this is not available out of the box yet. Cloudbees has a proprietary plugin called "checkpoints" which can do that, see plugin docs here.

此插件可能会在不久的将来默认添加到Jenkins中,请参阅此问题.

This plugin may be added in Jenkins by default in near future, see this issue.

PS:这是 Jenkins构建管道-在阶段重新启动的副本(不能将其标记为重复)

PS: This is duplicate of Jenkins Build Pipeline - Restart At Stage (can't mark it as duplicated)

这篇关于在特定阶段触发詹金斯管道的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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