Trying to use local registry at Gitlab.

This commit is contained in:
Stanislav Nikitin 2020-09-28 00:24:21 +05:00
parent 8ce953d36e
commit 544e087260
No known key found for this signature in database
GPG Key ID: 106900B32F8192EE

23
.gitlab-ci.yml Normal file
View File

@ -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