Skip to the content.

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.

scopeRequired

The scope in which to define this construct.


idRequired

The scoped construct ID.


propsRequired

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
import { automation } from 'shady-island'

automation.ContainerImagePipeline.isConstruct(x: any)

Checks if x is a construct.

xRequired

Any object.


Properties

Name Type Description
node constructs.Node The tree node.
pipeline aws-cdk-lib.aws_codepipeline.Pipeline The CodePipeline pipeline.

nodeRequired
public readonly node: Node;

The tree node.


pipelineRequired
public readonly pipeline: 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.

containerRequired
public readonly container: string;

The name of the container in the task definition to update.


repositoryRequired
public readonly repository: IRepository;

The ECR repository where images will be pushed.


serviceRequired
public readonly service: IBaseService;

The ECS service to update when an image is pushed to the ECR repository.


artifactBucketOptional
public readonly artifactBucket: IBucket;

A custom bucket for artifacts.


pipelineTypeOptional
public readonly pipelineType: PipelineType;

The pipeline type (V1 or V2).


tagOptional
public readonly tag: string;

The container image tag to observe for changes in the ECR repository.