Skip to content

Commit

Permalink
feat(ecs): introduce a new Image type, TagParameterContainerImage, me…
Browse files Browse the repository at this point in the history
…ant to be used in CodePipeline

While CDK Pipelines is the idiomatic way of deploying ECS applications in CDK,
it does not handle the case where the application's source code is kept in a separate source code repository from the CDK infrastructure code.
This adds a new class to the ECS module,
`TagParameterContainerImage`, that allows deploying a service managed that way through CodePipeline.

Related to aws#1237
Related to aws#7746
  • Loading branch information
skinny85 committed Dec 7, 2020
1 parent bfee58c commit 8e8d77f
Show file tree
Hide file tree
Showing 6 changed files with 2,224 additions and 1 deletion.
14 changes: 13 additions & 1 deletion packages/@aws-cdk/aws-codepipeline-actions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ for more details about using CloudFormation in CodePipeline.

#### Actions defined by this package

This package defines the following actions:
This package contains the following CloudFormation actions:

* **CloudFormationCreateUpdateStackAction** - Deploy a CloudFormation template directly from the pipeline. The indicated stack is created,
or updated if it already exists. If the stack is in a failure state, deployment will fail (unless `replaceOnFailure`
Expand Down Expand Up @@ -657,6 +657,18 @@ const deployStage = pipeline.addStage({

[image definition file]: https://docs.aws.amazon.com/codepipeline/latest/userguide/pipelines-create.html#pipelines-create-image-definitions

#### Deploying ECS applications stored in a separate source code repository

The idiomatic CDK way of deploying an ECS application is to have their Docker files and the CDK code residing in the same source code repository,
leveraging [Docker Assets])(https://docs.aws.amazon.com/cdk/latest/guide/assets.html#assets_types_docker),
and use the [CDK Pipelines module](https://docs.aws.amazon.com/cdk/api/latest/docs/pipelines-readme.html).

However, if you want to deploy a Docker application whose source code is kept in a separate version control repository than the CDK code,
you can use the `TagParameterContainerImage` class from the ECS module.
Here's an example:

[example ECS pipeline for an application in a separate source code repository](test/integ.pipeline-ecs-separate-source.lit.ts)

### AWS S3 Deployment

To use an S3 Bucket as a deployment target in CodePipeline:
Expand Down
Loading

0 comments on commit 8e8d77f

Please sign in to comment.