I currently have a jenkins job, say job1, that deploys some artifacts to a server(s), eg it deploys A, B to some server.
I also have the
rebuild plugin which displays a "rebuild last" icon on the job1 page which automatically knows the version numbers of the last artifacts I ran the job against.
I now have another job, say job2, which can deploy A to some server independently of B.
So let's say I have the following scenario:
job1 deploys A0, B0
job2 deploys A1
job1 deploys A2, B1 <- but this deploy caused problems in production
So now I'd like a "rollback" plugin, with a "rollback" icon - similar to the "rebuild last" - on the job1 page which knows that the previous deployed artifact A is A1, so it deploys A1, B0 instead of A0, B0 which is what the rebuild plugin would do.
I haven't found anything that does this so I thought I'd ask here if I need to write a custom plugin or if there any other recommendation on how to achieve what I want?
I guess an alternative would be to create a separate rollback-job1 but it'd be really nice to keep a rollback option within the job1 page itself via a plugin.