Getting Jenkins to rebuild the version before the latest version of an artifiact on a server

45 views
Skip to first unread message

oswal...@digital.cabinet-office.gov.uk

unread,
Dec 8, 2015, 12:22:51 PM12/8/15
to Jenkins Users
Hello,

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'm confident that I can store various version numbers using the version number plugin.
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.

Thanks,
Oswald

oswal...@digital.cabinet-office.gov.uk

unread,
Dec 8, 2015, 12:47:47 PM12/8/15
to Jenkins Users
Ah, nevermind. I think I can use https://wiki.jenkins-ci.org/display/JENKINS/EnvInject+Plugin to write version numbers as variables and go down the route of creating a separate rollback job.
Reply all
Reply to author
Forward
0 new messages