简体   繁体   English

避免在Jenkins中同时修改作业

[英]Avoid simultaneous job modifications in Jenkins

I am using the Jenkins Job DSL Plugin to create template jobs. 我正在使用Jenkins Job DSL插件来创建模板作业。

There is a problem when two or more users are modifying the same template job (or any other job) simultaneously. 当两个或多个用户同时修改同一模板作业(或任何其他作业)时出现问题。 The configuration of the last user to save or apply the modifications are registered and the modifications of the other user are removed because the two users were working on the same configuration version. 将注册保存或应用修改的最后一个用户的配置,并删除其他用户的修改,因为这两个用户正在使用相同的配置版本。

For example: Recently, I had to add a user to the global authorization matrix in a template job. 例如:最近,我不得不在模板作业中将用户添加到全局授权矩阵。 I did that and i saved and build it. 我做到了,我保存并构建它。 However, another user was modifying the same template job all day and he saved it at the end of the day and my changes were removed. 但是,另一个用户整天都在修改相同的模板作业,并在一天结束时将其保存并删除了我的更改。

Is there a way to avoid this simultaneous job modifications by locking the configuration of a job for other users when that user is currently updating it? 当用户当前正在更新作业时,是否有办法通过锁定其他用户的作业配置来避免同时进行作业修改?

Not currently available in core. 目前不提供核心版本。

Full Answer 完整答案

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

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