Skip to content

Commit

Permalink
Add documentation for generate-pipeline command
Browse files Browse the repository at this point in the history
Note that I also had to add an ignore rule for pydocstyle:

 D301: Use r""" if any backslashes in a docstring

The backslash style is required for click to preserve
newlines (http://click.pocoo.org/5/documentation/).
  • Loading branch information
jamesls committed Apr 4, 2017
1 parent c34db32 commit 1b1d8fc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ check:
# Proper docstring conventions according to pep257
#
#
pydocstyle --add-ignore=D100,D101,D102,D103,D104,D105,D204 chalice/
pydocstyle --add-ignore=D100,D101,D102,D103,D104,D105,D204,D301 chalice/
#
#
#
Expand Down
15 changes: 15 additions & 0 deletions chalice/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,21 @@ def package(ctx, single_file, stage, out):
@click.pass_context
def generate_pipeline(ctx, filename):
# type: (click.Context, str) -> None
"""Generate a cloudformation template for a starter CD pipeline.
This command will write a starter cloudformation template to
the filename you provide. It contains a CodeCommit repo,
a CodeBuild stage for packaging your chalice app, and a
CodePipeline stage to deploy your application using cloudformation.
You can use any AWS SDK or the AWS CLI to deploy this stack.
Here's an example using the AWS CLI:
\b
$ chalice generate-pipeline pipeline.json
$ aws cloudformation deploy --stack-name mystack \b
--template-file pipeline.json --capabilities CAPABILITY_IAM
"""
from chalice.pipeline import create_pipeline_template
factory = ctx.obj['factory'] # type: CLIFactory
config = factory.create_config_obj()
Expand Down

0 comments on commit 1b1d8fc

Please sign in to comment.