java11/.gitlab-ci.yml

32 lines
592 B
YAML
Raw Normal View History

2020-09-28 00:31:39 +05:00
image: docker:dind
services:
- docker:dind
2020-09-28 00:34:04 +05:00
variables:
DOCKER_HOST: tcp://dind:2375
stages:
- build
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.pztrn.name
build-local-registry-latest:
stage: build
2020-09-28 00:25:46 +05:00
tags:
- docker
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
script:
- docker build --pull -t $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
only:
- tags