FAQ | This is a LIVE service | Changelog

Skip to content
Commits on Source (2)
......@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [2.4.4] - 2023-07-07
### Fixed
- artifact-registry: Add docker-in-docker service now that the GKE runner does not mount the
`docker.sock` from the host (see
https://gitlab.developers.cam.ac.uk/uis/devops/devhub/gitlab-runner-infrastructure/-/merge_requests/14).
## [2.4.3] - 2023-07-03
### Fixed
......
......@@ -26,7 +26,14 @@
artifact-registry-push:
stage: production
image: google/cloud-sdk:alpine
image: registry.gitlab.developers.cam.ac.uk/uis/devops/infra/dockerimages/gcloud-docker:latest
services:
- docker:24-dind
variables:
DOCKER_HOST: tcp://docker:2376
DOCKER_TLS_CERTDIR: "/certs"
DOCKER_TLS_VERIFY: 1
DOCKER_CERT_PATH: "$DOCKER_TLS_CERTDIR/client"
script: |
# This is adapted from the Auto-DevOps Build job to ensure we're working on the same image!
# See https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Jobs/Build.gitlab-ci.yml
......@@ -47,13 +54,15 @@ artifact-registry-push:
artifact_registry_image="$CI_ARTIFACT_REGISTRY_REPOSITORY:${CI_APPLICATION_TAG%@*}"
artifact_registry_image_latest="$CI_ARTIFACT_REGISTRY_REPOSITORY:latest"
gcloud auth --impersonate-service-account $ARTIFACT_REGISTRY_SERVICE_ACCOUNT print-access-token \
| docker login -u oauth2accesstoken --password-stdin $ARTIFACT_REGISTRY_DOCKER_REPOSITORY
gcloud auth application-default \
--impersonate-service-account $ARTIFACT_REGISTRY_SERVICE_ACCOUNT print-access-token | \
docker login -u oauth2accesstoken --password-stdin $ARTIFACT_REGISTRY_DOCKER_REPOSITORY
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
docker pull $gitlab_image
docker tag $gitlab_image $artifact_registry_image
docker tag $gitlab_image $artifact_registry_image_latest
docker push $artifact_registry_image
docker push $artifact_registry_image_latest
tags:
......