From ecc5a78fda78bdf4002f58d2d197c6b4128f0d07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Pelletier?= Date: Sat, 9 Jul 2022 12:30:51 -0400 Subject: [PATCH] new gitlab-ci --- .gitlab-ci.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7e1a576..4571f74 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,19 +1,20 @@ # .gitlab-ci.yml -variables: - IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG - # Tell 'docker:dind' to enable TLS (recommended) - # and generate certificates in the specified directory. - DOCKER_TLS_CERTDIR: "/certs" - build-push-docker-image-job: # Specify a Docker image to run the job in. - image: docker:latest + image: docker:20-dind # Specify an additional image 'docker:dind' ("Docker-in-Docker") that # will start up the Docker daemon when it is brought up by a runner. services: - - docker:dind + - name: docker:20-dind + alias: docker + command: ["--tls=false"] script: - - docker image build --tag docker-registry.dev.jevalide.ca/emoji-flask-app:latest . - - docker push docker-registry.dev.jevalide.ca/emoji-flask-app:latest - + - docker image build --tag $DOCKER_REGISTRY/$IMAGE_TAG . + - docker push $DOCKER_REGISTRY/$IMAGE_TAG + variables: + DOCKER_DRIVER: overlay2 + DOCKER_TLS_CERTDIR: "" + DOCKER_HOST: tcp://docker:2375/ + IMAGE_TAG: emoji-flask-app:$CI_COMMIT_REF_SLUG + DOCKER_REGISTRY: docker-registry.dev.jevalide.ca