简体   繁体   English

使用扩展选项参数调度Jenkins作业

[英]Scheduling a Jenkins job with extended choice parameters

I have a job with extended choice parameters. 我有一个扩展选择参数的工作。 I have specified the parameters in a property file. 我在属性文件中指定了参数。 Now I want to schedule a job with parameters specified in the property file, but I can not do this. 现在我想安排一个带有属性文件中指定参数的作业,但我不能这样做。 I am using a cron entry like: 我使用的是cron条目:

35 11 * * 1-5 % States=Massachusetts

States is a parameter name and Massachusetts is a value from the property file. States是参数名称, Massachusetts是属性文件中的值。 How can I achieve this? 我怎样才能做到这一点?

You can create a Freestyle project job, and set the cron line in that job, then you add a build step that triggers the job you want to run and there you can pass your custom parameters, personally I use the predefined parameters, after that you have something like this 您可以创建一个Freestyle项目作业,并在该作业中设置cron行,然后添加一个构建步骤,触发您想要运行的作业,并且您可以传递自定义参数,我个人使用预定义参数,之后您有这样的事情

构建步骤

Where "test" is your job's name, and the params “测试”是你的工作名称和参数

STates=Massachusetts

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

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