0

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?

4

1 回答 1

1

我已经成功地使用了 git 来普遍保留已知的 Jenkins 状态。您可以运行一个额外的测试 Jenkins 实例,将其关闭,使用 git 恢复作业配置 XML,然后再次启动它。诚然,这不是一个好主意。使用 Selenium 也可能会变得棘手,但这似乎更不有趣。

于 2013-11-07T21:19:47.393 回答