Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fail dsl processing if config is already managed by another seed job #1147

Merged
merged 2 commits into from
Mar 22, 2019

Conversation

jpederzolli
Copy link
Member

This PR results in DSL processing failing if the job configuration being updated is already managed by another seed job.

This fix will resolve a scenario which has occurred more than a couple times at my company:

  1. developer copies DSL from another team's repository w/ no changes
  2. DSL is processed and developer realizes that they didn't update the DSL job definition(s) that were copied
  3. developer then updates the copied DSL with new config/naming, deleting the original job(s) and all history

Running the original seed job for the repository that was copied from will restore the original job(s), but all history will be lost.

@jpederzolli
Copy link
Member Author

@daspilker any chance of this getting merged or feedback? thanks!

@daspilker
Copy link
Member

@jpederzolli Looks good so far. Can you change the wording from "job" to "item" as the check will also apply to folders. Job DSL is used in a variety of ways, so people may rely on the fact that a job can be generated by different seed jobs. Can you add a checkbox to the build step UI, so that users have to enable the check?

@jpederzolli
Copy link
Member Author

Thanks @daspilker! Updates applied

@daspilker daspilker merged commit 83ec0a7 into jenkinsci:master Mar 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants