Skip to content

Commit

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

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

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
skinny85 authored and flochaz committed Jan 5, 2021
1 parent d0352df commit 3fdb78e
Show file tree
Hide file tree
Showing 6 changed files with 2,214 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 your Dockerfiles and your CDK code 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 3fdb78e

Please sign in to comment.