1回答
- 新しい順
- 投票が多い順
- コメントが多い順
0
I would find a way to reference the same image tag in your cdk app that you use in your image build/tag/push stage.
For example, if you had a docker stage that pushed an image using the environment variable CODEBUILD_RESOLVED_SOURCE_VERSION
as the tag like:
docker build -t $IMAGE_REPO_NAME:$CODEBUILD_RESOLVED_SOURCE_VERSION . docker push $IMAGE_REPO_NAME:$CODEBUILD_RESOLVED_SOURCE_VERSION
You could then reference that tag in your CDK app:
const tag = process.env.CODEBUILD_RESOLVED_SOURCE_VERSION; const image = ecs.ContainerImage.fromEcrRepository(ecrRepo, tag); new ApplicationLoadBalancedFargateService(this, 'Service', { taskImageOptions: { image: image, ... }, ... });
回答済み 4年前
関連するコンテンツ
- AWS公式更新しました 1年前