2017-08-31 12:44:47 +00:00
|
|
|
build:
|
|
|
|
image: docker:latest
|
|
|
|
services:
|
|
|
|
- docker:dind
|
|
|
|
stage: build
|
|
|
|
script:
|
|
|
|
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
2017-08-31 13:11:12 +00:00
|
|
|
- docker build --pull --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA .
|
|
|
|
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
|
2017-08-31 12:44:47 +00:00
|
|
|
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
|