CICD-274 · Google Artifact Registry
Encyclopedia · Cloud infrastructure integration · All snippets
Previous · CICD-273 · Next · CICD-275
1. Where it fits
- Placement CI run step or authorized lab terminal.
- Prerequisites provider CLI, scoped CI identity, test environment and provider configuration for named resource.
- Platforms github-actions, cloud-cli.
- Parameters
GAR_HOST,GAR_IMAGE.
2. Copy the snippet
bash
gcloud auth configure-docker "${GAR_HOST:?}" --quiet
docker push "${GAR_IMAGE:?}"3. How it works
The credential helper is configured for the exact registry hostname used by the image tag. Push transfers a locally tagged image to the configured registry. The registry's resulting manifest digest identifies the released content.
4. Verify the result
The tagged image must use the same regional registry hostname. Check writer permission on only the target repository.
Validation syntax-validated (Bash parse). Status definitions.