debian-mirror-gitlab/vendor/gitlab-ci-yml/Docker.gitlab-ci.yml

14 lines
373 B
YAML
Raw Normal View History

2016-06-22 15:30:34 +05:30
# Official docker image.
image: docker:latest
2016-09-29 09:46:39 +05:30
services:
- docker:dind
2016-06-22 15:30:34 +05:30
build:
stage: build
script:
2017-08-17 22:00:37 +05:30
- export IMAGE_TAG=$(echo -en $CI_COMMIT_REF_NAME | tr -c '[:alnum:]_.-' '-')
- docker login -u "gitlab-ci-token" -p "$CI_JOB_TOKEN" $CI_REGISTRY
- docker build --pull -t "$CI_REGISTRY_IMAGE:$IMAGE_TAG" .
- docker push "$CI_REGISTRY_IMAGE:$IMAGE_TAG"