Skip to content
Snippets Groups Projects
Commit f5a7eb75 authored by Graeme Gillies's avatar Graeme Gillies
Browse files

fix: gorelaser-fips docker login setup

Part of https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/team/-/issues/1312

It turns out that the `entrypoint.sh` in the cross compile version of the goreleaser
docker image is completely different from the original. It expects a json in a custom
format to run `docker login` inside the container.

Rather than try and construct the json it expects from CI variables and pass that in,
we will instead run `docker login` in the CI job and then just mount the docker auth
file into the container itself.
parent dca37ddd
No related branches found
No related tags found
No related merge requests found
Pipeline #15445877 passed
Loading
Loading
@@ -85,10 +85,12 @@ goreleaser-fips:
----------------------------------------------------------
Running go-releaser in fips mode
EOD
echo "$CI_REGISTRY_PASSWORD" | docker login "$CI_REGISTRY" -u "$CI_REGISTRY_USER" --password-stdin
docker run --rm --privileged \
-v $PWD:$PWD \
-w $PWD \
-v /var/run/docker.sock:/var/run/docker.sock \
-v $HOME/.docker/config.json:/root/.docker/config.json \
-e DOCKER_USERNAME -e DOCKER_PASSWORD -e DOCKER_REGISTRY \
-e GITLAB_TOKEN -e CI_REGISTRY_IMAGE \
-e CI_SERVER_URL \
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment