AWS CodeBuild stage isn't generating ContainerImage parameter in the params output file

24 views Asked by At

I am using Copilot CLI (copilot-linux-arm64-v1.28.0) for managing deployments via AWS CodePipeline. Deploying with "copilot svc deploy" succeeds on staging and production. However, I am unable to get the pipeline to run go beyond the CodeBuild stage. Specifically, the ContainerImage parameters isn't being generated in the output JSON file (see here). I have checked the CloudFormation stack template that I am using (2010-09-09), and it does have the ContainerImage parameter defined.

NOTE: I only encountered this issue after switching from copilot v1.13.0 to copilot v1.28.0 (the older version was having another issue with deprecated nodejs version for creating Lambda functions).

For the other configurations, buildspec.yml file, pipeline.yml, and manifest.yml (links on Pastebin).

repo=$(cat $CODEBUILD_SRC_DIR/infrastructure/$workload-$env.params.json | jq -r '.Parameters.ContainerImage');
region=$(echo $repo | cut -d'.' -f4);
docker login -u AWS -p $(aws ecr get-login-password --region $region) $AWS_ACCOUNT_ID.dkr.ecr.$region.amazonaws.com
docker tag $image_id $repo;
docker push $repo;

Any tips or guidance would be highly appreciated

0

There are 0 answers