1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
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, ... }, ... });
répondu il y a 4 ans
Contenus pertinents
- demandé il y a un an
- Réponse acceptéedemandé il y a un an
- AWS OFFICIELA mis à jour il y a 5 ans
- AWS OFFICIELA mis à jour il y a 5 ans