Skip to content

Commit

Permalink
Add Rollback and deploy list docs back in
Browse files Browse the repository at this point in the history
  • Loading branch information
flomotlik committed Nov 2, 2016
1 parent c3cc180 commit 94ad953
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/providers/aws/cli-reference/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ serverless deploy --stage production --region eu-central-1
With this example we've defined that we want our service to be deployed to the `production` stage in the region
`eu-central-1`.

## List existing deploys

```
serverless deploy list
```

Running this command will list your recent deployments available in your S3 deployment bucket. It will use stage and region from the provider config and show the timestamp of each deployment so you can roll back if necessary.

## Provided lifecycle events
- `deploy:cleanup`
- `deploy:initialize`
Expand All @@ -54,4 +62,4 @@ With this example we've defined that we want our service to be deployed to the `
- `deploy:compileFunctions`
- `deploy:compileEvents`
- `deploy:deploy`
- `deploy:function:deploy`
- `deploy:function:deploy`
77 changes: 77 additions & 0 deletions docs/providers/aws/cli-reference/rollback.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<!--
title: Serverless Rollback CLI Command
menuText: Rollback
menuOrder: 9
description: Rollback the Serverless service to a specific deployment
layout: Doc
-->

<!-- DOCS-SITE-LINK:START automatically generated -->
### [Read this on the main serverless docs site](https://www.serverless.com/framework/docs/providers/aws/cli-reference/rollback)
<!-- DOCS-SITE-LINK:END -->


# Rollback

Rollback the Serverless service to a specific deployment.

```bash
serverless rollback --timestamp timestamp
```

## Options
- `--timestamp` or `-t` The stage in your service you want to display information about.
- `--verbose` or `-v` Shows any Stack Output.

## Provided lifecycle events
- `rollback:initialize`
- `rollback:rollback`

## Examples

### AWS

At first you want to run `serverless deploy list` to show your existing deployments. This will provide you with a list of the deployments stored in your S3 bucket. You can use the timestamp of one of these deployments to set your infrastructure stack to this specific deployment.

**Example:**

```
$ serverless deploy list
Serverless: Listing deployments:
Serverless: -------------
Serverless: Timestamp: 1476790110568
Serverless: Datetime: 2016-10-18T11:28:30.568Z
Serverless: Files:
Serverless: - compiled-cloudformation-template.json
Serverless: - mail-service.zip
Serverless: -------------
Serverless: Timestamp: 1476889476243
Serverless: Datetime: 2016-10-19T15:04:36.243Z
Serverless: Files:
Serverless: - compiled-cloudformation-template.json
Serverless: - mail-service.zip
Serverless: -------------
Serverless: Timestamp: 1476893957131
Serverless: Datetime: 2016-10-19T16:19:17.131Z
Serverless: Files:
Serverless: - compiled-cloudformation-template.json
Serverless: - mail-service.zip
Serverless: -------------
Serverless: Timestamp: 1476895175540
Serverless: Datetime: 2016-10-19T16:39:35.540Z
Serverless: Files:
Serverless: - compiled-cloudformation-template.json
Serverless: - mail-service.zip
Serverless: -------------
Serverless: Timestamp: 1476993293402
Serverless: Datetime: 2016-10-20T19:54:53.402Z
Serverless: Files:
Serverless: - compiled-cloudformation-template.json
Serverless: - mail-service.zip
$ serverless rollback -t 1476893957131
Serverless: Updating Stack…
Serverless: Checking Stack update progress…
.....
Serverless: Stack update finished…
```

0 comments on commit 94ad953

Please sign in to comment.