From 49f9f3aee4e42f7abf1b74e3ad31fe204857dd72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= <tormakristof@tormakristof.eu> Date: Wed, 3 Feb 2021 16:22:08 +0100 Subject: [PATCH] push to docker hub as well --- .gitlab-ci.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 704bfda..0b6b5da 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -51,7 +51,7 @@ Flake8: # - pip install -r requirements/production.txt # - python src/manage.py test -Docker build: +Docker build to KSZK registry: stage: Docker Build tags: [kszk] only: @@ -63,6 +63,18 @@ Docker build: - echo "{\"auths\":{\"registry.kszk.bme.hu\":{\"username\":\"$REGISTRY_USER\",\"password\":\"$REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CONTAINER_IMAGE +Docker build to Docker Hub registry: + stage: Docker Build + tags: [kszk] + only: + - tags + image: + name: gcr.io/kaniko-project/executor:debug + entrypoint: [''] + script: + - echo "{\"auths\":{\"hub.docker.com\":{\"username\":\"$DOCKERHUB_USER\",\"password\":\"$DOCKERHUB_PASSWORD\"}}}" > /kaniko/.docker/config.json + - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CONTAINER_IMAGE + Deploy to Kubernetes: stage: deploy image: alpine -- GitLab