系统用户在Jenkins上更新作业的配置 [英] Configuration of Jobs getting updated by System user on Jenkins

查看:63
本文介绍了系统用户在Jenkins上更新作业的配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用Jenkins企业版.每当我们更新作业配置时,在某些情况下,系统用户都会再次将其配置更新为之前的配置.

We are using Jenkins enterprise version. Whenever we update job configs there are cases where the config is again updated with the System user to what it was earlier.

我们无法理解正在执行什么过程.

We are unable to understand what process is doing that.

谢谢您的帮助.

由于声誉不高,我无法附加屏幕截图以了解发生的情况.

I'm unable to attach a screenshot to give an idea of what is happening as my reputation is not high enough.

推荐答案

最有可能的原因是,您的工作包括参数化Jenkins Pipeline"阶段(感谢@rjohnston的上述"Jenkinsfile"评论,与此相关).并且在这种情况下,一旦参数代码包含在管道脚本的顶层,任何管道执行都会将作业的参数重置为指定的值"(如本文所指出:

Most likely, the reason is in the fact, that your job includes "Parameterized Jenkins Pipeline" stage (thanks to @rjohnston for the "Jenkinsfile" comment above, which is related to this). And in this case, once the parameters code "is included at the top level of the pipeline script, any pipeline execution resets the job’s parameters to the specified values" (as it is pointed out in this article: Parameterized Jenkins Pipelines).

因此,您不需要在作业配置页面本身中而是在管道脚本中更改配置参数,可以在配置"的管道"部分的脚本路径"字段中找到相对的链接.页面.

So, you need to change config parameters not in the job configuration page itself, but in the pipeline script, relative link to which you can find in the "Script Path" field of the "Pipeline" part of the "Config" page.

这篇关于系统用户在Jenkins上更新作业的配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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