On Tue, 27 Nov 2012 20:13:49 -0800 (PST), Jerry
<gpjerrymalo...@gmail.com> wrote:
> Hi, Jean-Marc. You should be able to do this by adding a build step
> before you run the rest of your job that executes a shell script to
> modify the config file. 

If you are suggesting something like

if ! cmp proposedConfig previousConfig ; then
   cp proposedConfig trueConfig
   cp proposedConfig previousConfig
fi

with the reset done as

cp defaultConfig trueConfig

It would have the problems
1/ what is presented in the editor is proposedConfig, not trueConfig,
thus error prone as the person who edit it would have to know that some
differences have to be undone and know which.
2/ undoing a reset is not possible in the editor without making a non
significant change, again making the process error prone.

> You might also make it a parameterized build
> (https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Build) to
> automate it further.

I don't see how to use this for my purpose. It looks like it would
suffer for the same problems as the previous solution and then some
more, providing all potential changes as parameters in a parametrized
build would be painful and some won't be modified for years.

Again, what I want is the possibility to modify the configuration for
the next builds until something reset them automatically to their
default. Currently the reset is done by copying a default to the
configuration file used, and modifying trueConfig is done by hand.

Thanks for your idea.

Yours,

-- 
Jean-Marc

Reply via email to