-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Store images in ssm. Copy tags. #105
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
4fd263f to
6c13740
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
ecs-update-and-deploy-task-definition/action.yml:181
- Using jq without compact formatting might produce JSON output with unnecessary whitespace or newlines that could cause issues when stored as an SSM parameter. Consider using jq with the -c flag to generate compact JSON.
MERGED_IMAGES=$(echo "$CURRENT_IMAGES" | jq --argjson new "$DEPLOYED_IMAGES" '. + $new')
| --output text) | ||
| echo "Current images from SSM: (These are all images stored for this task definition, before deploying.)" | ||
| echo $CURRENT_IMAGES | jq |
Copilot
AI
Apr 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The command does not handle cases where the SSM parameter does not exist, which could cause the script to fail. Consider adding error handling or providing a default value for CURRENT_IMAGES if the parameter is missing.
| --output text) | |
| echo "Current images from SSM: (These are all images stored for this task definition, before deploying.)" | |
| echo $CURRENT_IMAGES | jq | |
| --output text 2>/dev/null || echo "[]") | |
| if [ "$CURRENT_IMAGES" == "[]" ]; then | |
| echo "SSM parameter '$SSM_PARAMETER_NAME' does not exist or is empty. Using default value: []" | |
| else | |
| echo "Current images from SSM: (These are all images stored for this task definition, before deploying.)" | |
| echo $CURRENT_IMAGES | jq | |
| fi |
Description
Motivation and Context
Support Terraform deployment that reads the current image from SSM: https://github.com/oslokommune/pirates-iac/blob/672791bfebb05b6d16c5e00436dace27e65b8d5e/stacks/dev/app-too-tikki/_gp_ssm_container_images.tf