From 680a5456502431a2f7e71e7a9d904eb80dcb7c41 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Thu, 25 Aug 2022 14:27:14 +0100 Subject: [PATCH] Upload container to registry --- .gitlab-ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 67c28f3..c7ccb88 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,11 +45,15 @@ container: services: - docker:dind variables: + IMAGE_TAG: $CI_REGISTRY_IMAGE:latest DOCKER_BUILDKIT: 1 dependencies: [] stage: test + before_script: + - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY script: - - docker build -t website --target production . + - docker build -t website --target production -t $IMAGE_TAG . + - docker push $IMAGE_TAG .python_test_template: &python_test_template image: python:3.10