1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 21:46:22 +01:00
Files
openshift-docs/modules/deployments-rolling-back.adoc
2019-05-13 13:57:48 +10:00

41 lines
1.3 KiB
Plaintext

// Module included in the following assemblies:
//
// * applications/deployments/managing-deployment-processes.adoc
[id="deployments-rolling-back_{context}"]
= Rolling back a deployment
Rollbacks revert an application back to a previous revision and can be
performed using the REST API, the CLI, or the web console.
.Procedure
. To rollback to the last successful deployed revision of your configuration:
+
----
$ oc rollout undo dc/<name>
----
+
The DeploymentConfig's template is reverted to match the deployment
revision specified in the undo command, and a new ReplicationController is
started. If no revision is specified with `--to-revision`, then the last
successfully deployed revision is used.
. Image change triggers on the DeploymentConfig are disabled as part of
the rollback to prevent accidentally starting a new deployment process soon after
the rollback is complete.
+
To re-enable the image change triggers:
+
----
$ oc set triggers dc/<name> --auto
----
[NOTE]
====
DeploymentConfigs also support automatically rolling back to the last successful
revision of the configuration in case the latest deployment process fails. In
that case, the latest template that failed to deploy stays intact by the system
and it is up to users to fix their configurations.
====