#11 Added variables to allow for connection to registry

This commit is contained in:
Luke Else 2024-02-16 13:07:54 +00:00
parent 31215585da
commit 737e0e7a22

View File

@ -11,11 +11,16 @@ pytest:
- pytest - pytest
deploy: deploy:
image: docker:20.10.16 variables:
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
image: docker:stable
stage: deploy stage: deploy
services: services:
- docker:20.10.16-dind - docker:dind
script: script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY - docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA .
- docker pull $CI_REGISTRY/group/other-project:latest - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker run $CI_REGISTRY/group/other-project:latest - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA $CI_REGISTRY_IMAGE:latest
- docker push $CI_REGISTRY_IMAGE:latest