2020-09-28 00:37:56 +05:00
|
|
|
image: docker:19.03.13
|
2020-09-28 00:34:04 +05:00
|
|
|
|
2020-09-28 00:40:35 +05:00
|
|
|
services:
|
|
|
|
- docker:19.03.12-dind
|
|
|
|
|
|
|
|
variables:
|
|
|
|
DOCKER_HOST: tcp://docker:2375
|
|
|
|
DOCKER_TLS_CERTDIR: ""
|
|
|
|
|
2020-09-28 00:24:21 +05:00
|
|
|
stages:
|
|
|
|
- build
|
|
|
|
|
|
|
|
before_script:
|
|
|
|
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.pztrn.name
|
2020-09-28 00:40:35 +05:00
|
|
|
- docker info
|
2020-09-28 00:24:21 +05:00
|
|
|
|
|
|
|
build-local-registry-latest:
|
|
|
|
stage: build
|
2020-09-28 00:25:46 +05:00
|
|
|
tags:
|
|
|
|
- docker
|
2020-09-28 00:24:21 +05:00
|
|
|
script:
|
|
|
|
- docker build --pull -t $CI_REGISTRY_IMAGE:latest .
|
|
|
|
- docker push $CI_REGISTRY_IMAGE:latest
|
|
|
|
|
|
|
|
build-local-registry-version:
|
|
|
|
stage: build
|
2020-09-28 00:25:46 +05:00
|
|
|
tags:
|
|
|
|
- docker
|
2020-09-28 00:24:21 +05:00
|
|
|
script:
|
|
|
|
- docker build --pull -t $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG .
|
|
|
|
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
|
|
|
|
only:
|
|
|
|
- tags
|