From b91f8eb53962abce9c1a120e7cb3b5e5c333820c Mon Sep 17 00:00:00 2001 From: Vit Novotny <witiko@mail.muni.cz> Date: Wed, 6 Sep 2023 00:36:43 +0200 Subject: [PATCH] Set up Docker image deployment --- .gitlab-ci.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 69f79f29..a580de55 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,7 @@ cache: stages: - build + - deploy Style check: stage: build @@ -30,3 +31,14 @@ Type check: - pip install pytype script: - pytype scripts + +Deploy docker image: + stage: deploy + image: docker:latest + services: + - docker:dind + script: + - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY + - docker build -t $CI_REGISTRY/nlp/ahisto-modules/ocr-eval . + - docker push $CI_REGISTRY/nlp/ahisto-modules/ocr-eval + - docker rmi $CI_REGISTRY/nlp/ahisto-modules/ocr-eval -- GitLab