openverse-frontend
openverse-frontend copied to clipboard
Add a "Redeploy to current version" checkbox to the Rollback workflow
Problem
Right now to redeploy the same version of the frontend, you have to find the currently running version by visiting /version.json on the live environment you wish to redeploy. We could probably automate this fairly easily.
Description
Add a boolean input to the workflow dispatch settings and make the tag not-required. In the first step, check that either the tag is present or the "redeploy" boolean input is set to true but not both.
Create a new step that calculates the tag to use. If tag input is set, use that. If not, pull the current tag from the deployed version using https://search-{environment}.openverse.engineering/version.json and pulling the release property from the JSON. A Python shell script is a good option for this step.
Then in the two deployment workflow calls, pass the tag output from the new step.
Alternatives
Additional context
Implementation
- [ ] 🙋 I would be interested in implementing this feature.