Before you start
- Permission to deploy the application (
applications.deploy). Without it, History says “Undoing a release needs permission to deploy.” and the CLI refuses with “You do not have permission to roll back deploys of this application.” A scoped token must carry that scope. - An earlier published version. A rollback puts back a tag that is still in the application’s registry. It never builds one.
- An environment on one cluster. The portal puts a version back on one cluster at a time; for an environment on several clusters, use the CLI once per cluster.
- For the CLI: the Ankra CLI, logged in to the right organisation.
1. Find the last good version
- Portal
- CLI
Go to Applications → your application → History. History lists every change to the application: what changed, where, who did it and how it ended. Find the release before the one that went wrong, and note its version.Check: the release lines you can undo carry a Roll back to button naming the version, or Undo this release.
2. Roll back
- Portal
- CLI
On the release line in History, select Roll back to (or Undo this release). When a release did not go live, the environment’s card on the application’s Overview offers the same step as Put version back.The dialog asks Put version back on environment? and says which version runs now and which one Ankra puts back. Open What does not come back to read the list, then confirm with Put version back.Where the environment deploys on every push, Ankra also pauses its automatic updates, so the next build does not deploy over the version you put back. The dialog says so: “Automatic updates for … pause, so it stays on … until you resume them.”Check: the confirmation reads “Automatic updates are paused for …, so it stays on … until you resume them.” If it reads “Its automatic updates could not be paused, so the next build will deploy over …”, select Pause automatic updates.
3. Verify
- Portal: Applications → <your application> → Environments, under What’s live, shows the version the environment runs.
-
CLI: list the rollbacks recorded for the deployment, newest first, and read what it runs now:
What a rollback does not undo
A rollback moves the image and nothing else. Ankra lists what stays exactly as it is, in the portal dialog under What does not come back and in the CLI’s answer:- Database schema changes the newer version applied. An older image may not be able to read a migrated database.
- Data written since the newer version was deployed.
- The database itself, its storage, and any volume this application uses. Rolling the image back does not restore them.
- Secret and environment values changed since the newer version was deployed.
- Changes made to the stack itself: resource limits, replicas, ingress hosts, added components.
- Anything the newer version changed in a system outside this cluster.
Release the hold
A rolled-back environment stays on the version you put back until you let it move on.- Portal: after a rollback that paused automatic updates, select Resume automatic updates. The page reads “Automatic updates are on again: the next build deploys as usual.” You can also turn the switch back on under Applications → your application → Settings → Deploys → Deploy on every push.
-
CLI: a rollback from the CLI holds until Ankra observes a newer build of the tracked branch. Push the fix and the next build deploys as usual. To turn push to deploy back on after the portal paused it:
What can go wrong
Related
- Ship your app: how a merge redeploys, and push to deploy
- Environments and branch rules: which build each environment deploys
- The application page: every view of an application