mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
1.6 KiB
1.6 KiB
Read this on the main serverless docs site
Azure - Rollback
Rollback the Serverless service to a specific deployment.
serverless rollback --timestamp timestamp
Options
--resourceGroupor-g- Specify the resource group name--stageor-s- Specify stage name--regionor-r- Specify region name--subscriptionIdor-i- Specify subscription ID--timestampor-tThe deployment you want to rollback to.--verboseor-vShows any Stack Output.
Provided lifecycle events
rollback:rollback
Examples
Azure
At first you want to run serverless deploy list to show your existing deployments. This will provide you with a list of the ARM deployments from Azure. You can then use the timestamp of one of these deployments to set your infrastructure stack and app code to this specific deployment.
Example:
$ sls deploy list
Serverless: Listing deployments for resource group 'sls-myapp-rg':
Serverless:
Deployments
-----------
Name: sls-myapp-rg-deployment-t1562970576430
Timestamp: 1562970576430
Datetime: 2019-07-12T22:29:36.430Z
-----------
Name: sls-myapp-rg-deployment-t1562970293429
Timestamp: 1562970293429
Datetime: 2019-07-12T22:24:53.429Z
-----------
$ serverless rollback -t 1562970293429