Simpler approach for deleting test repository
Some checks are pending
CI/CD Pipeline / Test Backend (push) Waiting to run
CI/CD Pipeline / Test Frontend (push) Waiting to run
CI/CD Pipeline / Build and Push Docker Images (push) Blocked by required conditions
CI/CD Pipeline / Deploy to Production (push) Blocked by required conditions

This commit is contained in:
continuist 2025-06-28 14:23:09 -04:00
parent f721101722
commit 325095474a

View file

@ -609,17 +609,9 @@ docker pull localhost:5000/test:latest
# Remove from local Docker
docker rmi localhost:5000/test:latest
# Delete test image from registry using registry API
# Get the digest of the latest tag
DIGEST=$(curl -s -H "Accept: application/vnd.docker.distribution.manifest.v2+json" http://localhost:5000/v2/test/manifests/latest | grep -o '"digest":"[^"]*"' | cut -d'"' -f4)
# Delete the manifest from registry
if [ ! -z "$DIGEST" ]; then
echo "Deleting test image from registry..."
curl -X DELETE http://localhost:5000/v2/test/manifests/$DIGEST
else
echo "Could not find digest for test image"
fi
# Delete test repository from registry (simpler approach)
echo "Deleting test repository from registry..."
curl -X DELETE http://localhost:5000/v2/test/repository
# Clean up test file
rm /tmp/test.Dockerfile