RDTK / generator

A tool for creating Jenkins jobs and other things from recipes describing software projects
GNU General Public License v3.0
21 stars 3 forks source link

Sane default for delete-other #23

Closed LeroyR closed 5 years ago

LeroyR commented 5 years ago

Either default delete-other-pattern to <distribution-name>$ or introduce a new config value for cleaning up removed projects.

Is your feature request related to a problem? Please describe. I argue that the default workflow while creating/using dists is (re)generation of jenkins jobs including removing jobs with --delete-other --delete-other-pattern <dist>$

This also prevents accidental removal of all other jobs in jenkins instances that build multiple generations if the pattern is left on default during invocation with --delete-other

scymtym commented 5 years ago

I will commit an improvement for this.

Just to be clear, though:

introduce a new config value for cleaning up removed projects.

Is this referring to the file- and environment-variable-based configuration? If so, this is already the case. The option is called commands.generate.delete-other-pattern. It can be set in a configuration file like this:

[commands.generate]
delete-other-pattern = my-suffix$
LeroyR commented 5 years ago

This only matters if distributions are generated "alone" while there are multiple on the target jenkins. In this case it is not possible to have a fixed configured pattern as it depends on the used distribution

scymtym commented 5 years ago

This only matters if distributions are generated "alone" while there are multiple on the target jenkins. In this case it is not possible to have a fixed configured pattern as it depends on the used distribution

Sure, that's why I said I will commit an improvement for this irregardless of the configuration aspect.