automation
Submodule
Constructs
ContainerImagePipeline
Allows images pushed to an ECR repo to trigger updates to an ECS service.
This construct produces a CodePipeline pipeline using the “ECR Source” action, an “ECS Deploy” action, and a custom Lambda handler in between that transforms the JSON from the “Source” action into the JSON needed for the “Deploy” action.
Initializers
import { automation } from 'shady-island'
new automation.ContainerImagePipeline(scope: Construct, id: string, props: ContainerImagePipelineProps)
Name | Type | Description |
---|---|---|
scope |
constructs.Construct |
- The scope in which to define this construct. |
id |
string |
- The scoped construct ID. |
props |
ContainerImagePipelineProps |
- Initialization properties for this construct. |
scope
Required
- Type: constructs.Construct
The scope in which to define this construct.
id
Required
- Type: string
The scoped construct ID.
props
Required
Initialization properties for this construct.
Methods
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
toString
public toString(): string
Returns a string representation of this construct.
Static Functions
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
isConstruct
isConstruct
import { automation } from 'shady-island'
automation.ContainerImagePipeline.isConstruct(x: any)
Checks if x
is a construct.
x
Required
- Type: any
Any object.
Properties
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
pipeline |
aws-cdk-lib.aws_codepipeline.Pipeline |
The CodePipeline pipeline. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
pipeline
Required
public readonly pipeline: Pipeline;
- Type: aws-cdk-lib.aws_codepipeline.Pipeline
The CodePipeline pipeline.
Structs
ContainerImagePipelineProps
Properties for the ContainerImagePipeline constructor.
Initializer
import { automation } from 'shady-island'
const containerImagePipelineProps: automation.ContainerImagePipelineProps = { ... }
Properties
Name | Type | Description |
---|---|---|
container |
string |
The name of the container in the task definition to update. |
repository |
aws-cdk-lib.aws_ecr.IRepository |
The ECR repository where images will be pushed. |
service |
aws-cdk-lib.aws_ecs.IBaseService |
The ECS service to update when an image is pushed to the ECR repository. |
artifactBucket |
aws-cdk-lib.aws_s3.IBucket |
A custom bucket for artifacts. |
pipelineType |
aws-cdk-lib.aws_codepipeline.PipelineType |
The pipeline type (V1 or V2). |
tag |
string |
The container image tag to observe for changes in the ECR repository. |
container
Required
public readonly container: string;
- Type: string
The name of the container in the task definition to update.
repository
Required
public readonly repository: IRepository;
- Type: aws-cdk-lib.aws_ecr.IRepository
The ECR repository where images will be pushed.
service
Required
public readonly service: IBaseService;
- Type: aws-cdk-lib.aws_ecs.IBaseService
The ECS service to update when an image is pushed to the ECR repository.
artifactBucket
Optional
public readonly artifactBucket: IBucket;
- Type: aws-cdk-lib.aws_s3.IBucket
- Default: A new bucket will be created
A custom bucket for artifacts.
pipelineType
Optional
public readonly pipelineType: PipelineType;
- Type: aws-cdk-lib.aws_codepipeline.PipelineType
- Default: V1
The pipeline type (V1 or V2).
tag
Optional
public readonly tag: string;
- Type: string
- Default: “latest”
The container image tag to observe for changes in the ECR repository.