Rebuilding in Jenkins

leena

September 22, 2011

One option that might be required after setting up a build pipeline is the provision to redeploy an earlier version by click of a button. This can become handy when we find a bug in the production and want to see when the bug got introduced. For that we will have to redeploy the earlier version to the staging/UAT environment and test the same. Jenkins by default does not allow to rerun any of the earlier jobs. But you can achieve this by the Rebuild plugin. It allows you to rebuild any job provided its parameterized build. It also allows you override the parameters. It will show the “Rebuild” button at the left side as shown below when you go to specific build page:

rebuild

This is not a replacement for revert build, because it does not take care of reverting DB. But this can be extended to do the same. Note: It will show the Rebuild button only for those builds which occurred after installing the plugin. I took some time to realize this and it is not very clear in the documentation.