how to deploy an ecs service with a task definition that has 2 images with blue green deployment?

0

I had configured CodePipeline with CodeBuild and ECS blue green as an action provider to deploy my ECS service. In my buildspec.yml I created imageDetail.json like this

{"ImageURI": "imageid"}. 

This setup was working fine when my task definition had only one image.

Now my task definition has two images where one image depends from the other so I changed my buildspec.yml to create an imageDetail.json like this:

[{"ImageURI":"image1"}, {"ImageURI":"image2"}]

When configuring the pipeline with codebuild and ECS blue green deploy with this new task definition and imageDetail.json that has 2 images it is throwing the following error: "Exception while trying to parse the image URI file from the artifact: BuildArtifact."

Then I tried doing this same setup but with ECS (rolling update) as an action provider instead of ECS blue green and it worked. With ECS (rolling update) as an action provider I needed to create an imagedefinitions.json instead of an imageDetail.json. The imagedefinitions.json created in buildspec.yml looks like this:

[{"name":"name1","imageUri":"image1"}, {"name":"name2","imageUri":"image2"}]

However, I want to use ECS blue green as an action provider where I need to create an imageDetail.json in the buildspec.yml file. So, can I create an imageDetail.json with two images like in imagedefinitions.json?

I also made the same question here: https://stackoverflow.com/questions/73947923/how-to-deploy-an-ecs-service-with-a-task-definition-that-has-2-images-with-blue

답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠