ecs-deploy icon indicating copy to clipboard operation
ecs-deploy copied to clipboard

Doesn't actually update the image

Open richstokes opened this issue 2 years ago • 2 comments

Am I missing something silly here?

I am running the command, it goes in and "updates" the task definition, but with the original image name. It just re-deploys the same image, doesn't update it to the one I specify? 🤔

Running:

ecs-deploy.sh -n "just-another-test-staging" -i "strm/helloworld-http" -c "test-cluster"

I get:

Using image name: strm/helloworld-http:latest
Current task definition: arn:aws:ecs:us-east-1:xxxx:task-definition/just-another-test:3
New task definition: arn:aws:ecs:us-east-1:xxxx:task-definition/just-another-test:4
Service updated successfully, new task definition running.
Waiting for service deployment to complete...
Service deployment successful.

But when I check in ECS, the service/tasks are running on the new version, but it still has their original image name set in the task definition. Confused.

richstokes avatar Jul 08 '21 00:07 richstokes

Even weirder, it works just fine if I set the image as -i "nginx:latest". Once that completed, I tried again with -i "strm/helloworld-http" but the image remains as nginx:latest on the new task definition it generates 😖

richstokes avatar Jul 08 '21 00:07 richstokes

I ran into a similar problem. Tracked the problem to the matching of the existing Image that has to match, only tag is allowed to be different.

https://github.com/silinternational/ecs-deploy/blob/721099aca6866ffe2ec94bd95afc7cf83c6183e9/ecs-deploy#L365

The sed that does the search and replade does not error out if there is no match, it just fails silently doing nothing. The fix would be to print an error if there is not match for the image provided to the ecs-deploy.sh script.

diepes avatar Jun 08 '22 23:06 diepes