简体   繁体   English

ParameterizedCron 在声明性管道中触发多个作业

[英]ParameterizedCron triggers multiple jobs in a declarative pipeline

I am trying to run multiple test lists using the Parameterized Scheduler inside a scripted pipeline.我正在尝试使用脚本管道内的参数化调度程序运行多个测试列表。

The cron works fine for the 2.30pm and triggers list_id=163 , but at 3pm it triggers both list_id=119 and list_id=163 . cron 在下午 2点 30 分工作正常并触发list_id=163 ,但在下午 3 点它同时触发list_id=119list_id=163 Any suggestions on how to tackle this, or am I missing a parameter?关于如何解决这个问题的任何建议,或者我是否缺少参数?
Thank you谢谢

properties([parameters([
         string(name: 'TEST_LIST_ID', defaultValue: '163', description: 'Feature test 1'),
         string(name: 'TEST_LIST_ID', defaultValue: '119', description: 'Feature test 2')
]),
pipelineTriggers([parameterizedCron('''
                   H/30 14 * * 1-5 %TEST_LIST_ID=163
                   H 15 * * 1-5 %TEST_LIST_ID=119
                   ''')])

Blockquote块引用

Update: I was able to solve the issue of multiple triggers by spacing out the cron time and also by using changing the order of the crons For eg: My jenkinsfile has 12 crons, so I ordered the crons in decreasing order of time while also making sure there is enough time between subsequent jobs.更新:我能够通过间隔 cron 时间以及更改 cron 的顺序来解决多个触发器的问题,例如:我的jenkinsfile有 12 个 cron,所以我按时间递减的顺序排列 cron,同时也使确保后续作业之间有足够的时间。

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

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