简体   繁体   English

如何使用其他(远程)XML配置文件运行Jenkins作业

[英]How to run Jenkins job with a different (remote) xml config file

Usually jenkins running job with a config file stored in directory: 通常,jenkins运行作业时将配置文件存储在目录中:

%Jenkins installation folder%\\Jenkins\\jobs\\%Job name%\\config.xml %Jenkins安装文件夹%\\ Jenkins \\ jobs \\%作业名称%\\ config.xml

Is there a possibility to run job using configuration file stored in a different place? 是否可以使用存储在其他位置的配置文件来运行作业?

(For example, we want to use a different configurations for job but do not want to change main config file) (例如,我们要为作业使用其他配置,但不想更改主配置文件)

If the job configs are different, then use different jobs. 如果作业配置不同,则使用不同的作业。 If you want to "try" some changes without affecting the main job, then copy job and change the copied job. 如果要在不影响主作业的情况下“尝试”某些更改,请复制作业并更改复制的作业。

There is also Storable Configs plugin that lets you store different sets of values for Parameterized Build (but this is only for parameterized build values, not the whole job). 还有一个Storable Configs插件,可用于存储参数化构建的不同值集(但这仅适用于参数化构建值,而不是整个作业)。

And there is Job DSL plugin, which allows to load a job config from different files, but it uses it's own language to describe the jobs. 还有Job DSL插件,它允许从不同的文件加载作业配置,但是它使用自己的语言来描述作业。

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

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