1 Risposta
- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
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, ... }, ... });
con risposta 4 anni fa
Contenuto pertinente
- AWS UFFICIALEAggiornata 3 mesi fa
- AWS UFFICIALEAggiornata un anno fa