ocr/.gitlab-ci.yml

45 lines
829 B
YAML
Raw Normal View History

2019-09-16 13:39:02 +00:00
image: docker:stable
2019-09-16 13:30:11 +00:00
services:
2019-09-16 13:39:02 +00:00
- docker:stable-dind
variables:
DOCKER_DRIVER: overlay2
2019-09-16 13:30:11 +00:00
2019-06-04 10:18:31 +00:00
stages:
- build
- push
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
Build:
script:
2019-11-04 14:14:59 +00:00
- docker build --pull -t $CI_REGISTRY_IMAGE:tmp .
- docker push $CI_REGISTRY_IMAGE:tmp
2019-06-04 10:18:31 +00:00
stage: build
tags:
- docker
Push latest:
only:
- master
script:
2019-11-04 14:14:59 +00:00
- docker pull $CI_REGISTRY_IMAGE:tmp
- docker tag $CI_REGISTRY_IMAGE:tmp $CI_REGISTRY_IMAGE:latest
2019-06-04 10:18:31 +00:00
- docker push $CI_REGISTRY_IMAGE:latest
stage: push
tags:
- docker
Push tag:
only:
- tags
script:
2019-11-04 14:14:59 +00:00
- docker pull $CI_REGISTRY_IMAGE:tmp
- docker tag $CI_REGISTRY_IMAGE:tmp $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
2019-06-04 10:18:31 +00:00
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
stage: push
2019-03-13 17:17:08 +00:00
tags:
2019-06-04 10:18:31 +00:00
- docker