Closed TheFlexican closed 2 years ago
Looking more into it, I think I'm mistaken for what it actually happening here.Have to admit, I'm just a beginner as a coder, so I tried to understand what's going on. My mistake. What i realized is that localTagName variable is assigned to the output of the command that loads the docker image. Somehow the output of the docker load command is not assigned to the localTagName variable.
Ill dig into that deeper and will close this issue.
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
Did you ever figure out how to fix this? I'm running into the same thing now.
Did you ever figure out how to fix this? I'm running into the same thing now.
Hi, well I have a workaround for it. You need to edit the buildspec for the docker asset in your pipeline and change the path in the assets file. Below is a sample of my buildspec file. Just look at your current command and copy the assembly-something/something.assets.json and place a line above it with sed just like below.
version: '0.2' phases: install: commands:
I have an issue open for this here https://github.com/aws/aws-cdk/issues/18044
What is the problem?
Using cdk pipelines to deploy ecs cluster, with a docker from tarball image. During the Assets codebuild stage I received the error:
Error parsing reference: "" is not a valid repository/tag: invalid reference format
After going over my code a couple of times, I figured it had to be something else, and started looking at the source code of cdk-assets.Found the following which too me doesn't really make sense. In packages/cdk-assets/lib/private/handlers/container-images.ts
the localTagName is assigned to the actual command to build the docker image in the assets file. Asset file snippet below:
To my understanding docker is trying to tag the image in ecr with the value of the executable param, which obviously fails.
Reproduction Steps
Setup a CDK pipeline to deploy ECS cluster with a docker image from tarball. Pipeline should create an Assets codebuild stage which will fail with the above mentioned error.
What did you expect to happen?
Successful deployment of ECS cluster
What actually happened?
Failed pipeline
CDK CLI Version
2.1.0 (build f4f18b1)
Framework Version
No response
Node.js Version
v16.3.0
OS
Ubuntu
Language
Typescript
Language Version
No response
Other information
No response