-
Notifications
You must be signed in to change notification settings - Fork 102
Add script to check container images' agent versions #1404
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1404 +/- ##
==========================================
- Coverage 86.39% 85.19% -1.20%
==========================================
Files 102 102
Lines 12622 12972 +350
==========================================
+ Hits 10905 11052 +147
- Misses 1236 1435 +199
- Partials 481 485 +4 see 21 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
scripts/check-images.sh
Outdated
|
|
||
| for tag in "${FOUND[@]}"; do | ||
| echo ":: ${REGISTRY_URL}/${IMAGE_NAME}:$tag" | ||
| podman pull ${REGISTRY_URL}/${IMAGE_NAME}:$tag > /dev/null 2>&1 |
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.
Can you add a check to see if docker or podman is installed? Some people might use docker over podman
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.
Sure
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.
Defaults to docker if available, if not it checks for podman
scripts/check-images.sh
Outdated
| echo "Checking images in ${REGISTRY_URL}/${IMAGE_NAME}" | ||
|
|
||
| # Fetch all tags from the remote registry | ||
| skopeo list-tags docker://${REGISTRY_URL}/${IMAGE_NAME} | jq -r '.Tags[]' > all_tags.txt |
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.
Would it be possible to use the skopeo docker image instead? https://github.com/containers/skopeo/blob/main/install.md#container-images
Would save people having to install skopeo on their machines
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.
True yeah I'll add that
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.
Do we want this implemented as a Github workflow in that case?
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.
dont think we need a github workflow. The script by itself is fine
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.
Added the skopeo image
scripts/check-images.sh
Outdated
| ${CONTAINER_TOOL} --version | ||
|
|
||
| echo "Getting skopeo tool..." | ||
| ${CONTAINER_TOOL} pull docker://${SKOPEO_IMAGE} |
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.
Getting this error when pulling image using docker
Getting skopeo tool...
invalid reference format
Proposed changes
Adds a script
check-images.shwhich can check the agent version and nginx version of all image tags matching a pattern.Example:
will return all the tags found for the
agentv3image which match the patternalpine, and run the commands:nginx -vnginx-agent -vChecklist
Before creating a PR, run through this checklist and mark each as complete.
CONTRIBUTINGdocumentmake install-toolsand have attached any dependency changes to this pull requestREADME.md)