Skip to content

Feature/docker validate sha #1386

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

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

agrasth
Copy link

@agrasth agrasth commented May 11, 2025

  • All tests passed. If this feature is not already covered by the tests, I added new tests.
  • All static analysis checks passed.
  • This pull request is on the dev branch.
  • I used gofmt for formatting the code before submitting the pull request.

Add --validate-sha flag for Docker push command

Description

This PR adds core support for the new --validate-sha flag in the Docker push command. When enabled, the flag allows the CLI to use the image's SHA digest for validation instead of the tag name during Docker push operations. This is particularly useful when pushing to virtual repositories where the tag might exist with different content in higher priority repositories.

Changes

  • Modified artifactory/utils/container/remoteagent.go to handle manifest digest mismatches gracefully
  • Updated the manifest validation logic to log warnings instead of failing when using the --validate-sha flag
  • Added detailed logging to help users understand what's happening during SHA-based validation

Testing

  • Manually tested the flag with both old and new CLI syntax
  • Verified behavior when pushing to repositories with existing tags
  • Confirmed build info collection works correctly with the flag

Related PRs

  • jfrog-cli: here
  • jfrog-cli-artifactory: here

@agrasth agrasth force-pushed the feature/docker-validate-sha branch from bdf4685 to fe001f2 Compare May 11, 2025 22:05
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.

1 participant