From 544e087260929bb31f68687adb8a8c6d292cede3 Mon Sep 17 00:00:00 2001 From: "Stanislav N. aka pztrn" Date: Mon, 28 Sep 2020 00:24:21 +0500 Subject: [PATCH] Trying to use local registry at Gitlab. --- .gitlab-ci.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..3a7020d --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,23 @@ +image: docker:latest +services: +- docker:dind + +stages: + - build + +before_script: + - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.pztrn.name + +build-local-registry-latest: + stage: build + script: + - docker build --pull -t $CI_REGISTRY_IMAGE:latest . + - docker push $CI_REGISTRY_IMAGE:latest + +build-local-registry-version: + stage: build + script: + - docker build --pull -t $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG . + - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG + only: + - tags