From ad95f831c09426f337e1f36d45ed17a78c5f2131 Mon Sep 17 00:00:00 2001 From: Bartosz Ziemba <b.ziemba@protonmail.com> Date: Wed, 2 Jun 2021 12:36:51 +0000 Subject: [PATCH] Added local registery --- .gitlab-ci.yml | 70 +++++++++++++++++++++++++++----------------------- 1 file changed, 38 insertions(+), 32 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 807bf26..2776958 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,32 +1,38 @@ -image: 'clarinpl/python:3.6' -cache: - paths: - - .tox -stages: - - check_style - - build -before_script: - - pip install tox==2.9.1 -pep8: - stage: check_style - script: - - tox -v -e pep8 -docstyle: - stage: check_style - script: - - tox -v -e docstyle -build_image: - stage: build - image: 'docker:18.09.7' - only: - - master - services: - - 'docker:18.09.7-dind' - before_script: - - '' - script: - - docker build -t clarinpl/anonymizer . - - echo $DOCKER_PASSWORD > pass.txt - - cat pass.txt | docker login --username $DOCKER_USERNAME --password-stdin - - rm pass.txt - - docker push clarinpl/anonymizer +image: 'clarinpl/python:3.6' +cache: + paths: + - .tox +stages: + - check_style + - build +before_script: + - pip install tox==2.9.1 +pep8: + stage: check_style + script: + - tox -v -e pep8 +docstyle: + stage: check_style + script: + - tox -v -e docstyle +build_image: + stage: build + image: 'docker:18.09.7' + only: + - master + services: + - 'docker:18.09.7-dind' + variables: + IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG + before_script: + - '' + script: + - docker build -t clarinpl/anonymizer . + - echo $DOCKER_PASSWORD > pass.txt + - cat pass.txt | docker login --username $DOCKER_USERNAME --password-stdin + - rm pass.txt + - docker push clarinpl/anonymizer + - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY + - docker build -t $IMAGE_TAG . + - docker push $IMAGE_TAG + -- GitLab