Reputation: 67310
At work we have a multi-step process for releasing a product and I'm trying to automate it. A few of these steps involve copying, modifying and deleting jobs on Jenkins. I've discovered how to do all of these via the Jenkins-CLI, but it's very hard to test my process in an automated way. It'd be nice if I could have a tearDown()
method that could do a thinBackup restore to the way things were before I changed any of the jobs. But, I don't see how that can be done. Can someone show me how to restore to a previous configuration without manual steps being involved?
Upvotes: 0
Views: 611
Reputation: 3854
I've used git with some success for generally preserving known Jenkins state. You could run an extra test Jenkins instance, shut it down, revert job config XMLs with git, and boot it again. Not a great idea, admittedly. You could also get tricky with Selenium, but that seems even less fun.
Upvotes: 1