Skip to content

Conversation

@sean-breen
Copy link
Contributor

Proposed changes

Adds a script check-images.sh which can check the agent version and nginx version of all image tags matching a pattern.

Example:

> scripts/check-images.sh agentv3 alpine
Checking images in docker-registry.nginx.com/nginx/agentv3
892 tags fetched.
165 tags after filtering.
tags matching 'alpine': 81
:: docker-registry.nginx.com/nginx/agentv3:1-alpine
nginx version: nginx/1.29.3
nginx-agent version v3.5.0-34a13e6
...

will return all the tags found for the agentv3 image which match the pattern alpine, and run the commands:

  • nginx -v
  • nginx-agent -v

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING document
  • I have run make install-tools and have attached any dependency changes to this pull request
  • If applicable, I have added tests that prove my fix is effective or that my feature works
  • If applicable, I have checked that any relevant tests pass after adding my changes
  • If applicable, I have updated any relevant documentation (README.md)
  • If applicable, I have tested my cross-platform changes on Ubuntu 22, Redhat 8, SUSE 15 and FreeBSD 13

@codecov
Copy link

codecov bot commented Nov 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.43%. Comparing base (f7e7012) to head (dee2e12).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1404      +/-   ##
==========================================
+ Coverage   86.24%   86.43%   +0.18%     
==========================================
  Files         102      102              
  Lines       12603    12603              
==========================================
+ Hits        10870    10893      +23     
+ Misses       1257     1232      -25     
- Partials      476      478       +2     

see 6 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6bf4d3d...dee2e12. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.


for tag in "${FOUND[@]}"; do
echo ":: ${REGISTRY_URL}/${IMAGE_NAME}:$tag"
podman pull ${REGISTRY_URL}/${IMAGE_NAME}:$tag > /dev/null 2>&1
Copy link
Collaborator

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

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

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

Copy link
Contributor Author

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

Copy link
Contributor Author

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?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants