Trying to use local registry at Gitlab.
This commit is contained in:
parent
8ce953d36e
commit
544e087260
23
.gitlab-ci.yml
Normal file
23
.gitlab-ci.yml
Normal 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
|
Loading…
Reference in New Issue
Block a user