nlp/.gitlab-ci.yml

45 lines
829 B
YAML
Raw Normal View History

2019-09-16 13:52:23 +00:00
image: docker:stable
2019-09-19 07:25:29 +00:00
services:
- docker:stable-dind
2019-09-16 13:52:23 +00:00
variables:
DOCKER_DRIVER: overlay2
2019-06-04 09:32:42 +00:00
stages:
- build
- push
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
Build:
2019-03-11 22:27:47 +00:00
script:
2019-11-04 14:15:41 +00:00
- docker build --pull -t $CI_REGISTRY_IMAGE:tmp .
2019-11-04 14:18:52 +00:00
- docker push $CI_REGISTRY_IMAGE:tmp
2019-06-04 09:40:39 +00:00
stage: build
2019-03-13 17:15:27 +00:00
tags:
2019-06-04 09:32:42 +00:00
- docker
2019-06-04 09:59:55 +00:00
Push latest:
2019-06-04 09:32:42 +00:00
only:
- master
script:
2019-11-04 14:15:41 +00:00
- docker pull $CI_REGISTRY_IMAGE:tmp
- docker tag $CI_REGISTRY_IMAGE:tmp $CI_REGISTRY_IMAGE:latest
2019-06-04 09:32:42 +00:00
- docker push $CI_REGISTRY_IMAGE:latest
2019-06-04 09:40:39 +00:00
stage: push
tags:
- docker
2019-06-04 09:32:42 +00:00
2019-06-04 09:59:55 +00:00
Push tag:
only:
- tags
2019-06-04 09:32:42 +00:00
script:
2019-11-04 14:15:41 +00:00
- docker pull $CI_REGISTRY_IMAGE:tmp
- docker tag $CI_REGISTRY_IMAGE:tmp $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
2019-06-04 09:32:42 +00:00
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
2019-06-04 09:40:39 +00:00
stage: push
tags:
- docker