Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't actually update the image #238

Open
richstokes opened this issue Jul 8, 2021 · 2 comments
Open

Doesn't actually update the image #238

richstokes opened this issue Jul 8, 2021 · 2 comments

Comments

@richstokes
Copy link

richstokes commented Jul 8, 2021

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
Copy link
Author

richstokes commented Jul 8, 2021

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 馃槚

@diepes
Copy link

diepes commented Jun 8, 2022

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.

| sed -e 's~"image":.*'"${imageWithoutTag}"'.*,~"image": "'"${useImage}"'",~g' \

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants