As of now, our solution is to replay the previous job. This makes sense but, maybe together we can discuss a more elegant solution.
g
green-school-95910
01/29/2020, 11:57 PM
I always considered replaying the previous job the best option for a rollback. In case of a failure what I want is for my service(s) to be exactly as they were on the last successful deploy.
Since doing the deploy requires credentials it has to be done in the exact same environment as before, which might also have changed (might even be the cause of the failure), so rolling back from a job on the same commit may break things even more.
What I usually do is a job to be executed when the deploy fails, it runs a script to list the pipelines of the project and create a new one on the same commit of the last successful one. Currently I'm running on Github Actions and doing the same thing.
👍 1
❤️ 1
t
thankful-optician-22583
01/30/2020, 6:17 PM
Just updating this thread with another solution
thankful-optician-22583
01/30/2020, 6:17 PM
Guys this is what I did to handle rollback, I first create an output object called
Copy code
export const appTag ='your image tag';
before I run pulumi update, I query the output file like this
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.