Maven Release Plugin Problems
In particular, some of the pitfalls of the maven-release-plugin in the context of git-flow are:
• MRP writes .backup and release.properties files to your working tree which are easily committed when they shouldn’t be
• MRP does a build in the prepare goal and a build in the perform goal causing tests to run 2 times
• MRP and git-flow both create tags leaving you with two tags if you forget to delete one of them
• If something goes wrong, MRP usually leaves you in a bad state and rollback doesn’t work most of the time
Restore job config
To do that I had to have the Job Configuration History plugin installed, so that it preserve the old config.xml’s and it could show what has changed.
But it does have a link for downloading the old config.xml file. I downloaded it.
Jenkins has a command-line interface, CLI. ssh may want to authenticate you and you must add your ssh public key to your Jenkins user information.
to restore the old job configuration was a simple one-liner:
ssh -p jenkinshost update-job jobname < config.xml
The port where Jenkins listens for ssh protocol (PORT) is random by default. You can either set it to a fixed port in the Jenkins configuration or you can look up the port number from Jenkins HTTP headers.