2016-06-16 04:39:17 -04:00
|
|
|
# Official docker image.
|
|
|
|
image: docker:latest
|
|
|
|
|
2016-09-01 19:20:40 -04:00
|
|
|
services:
|
2018-04-13 15:43:09 -04:00
|
|
|
- docker:stable-dind
|
2016-09-01 19:20:40 -04:00
|
|
|
|
2017-07-11 08:39:38 -04:00
|
|
|
before_script:
|
|
|
|
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
|
|
|
|
|
|
|
build-master:
|
|
|
|
stage: build
|
|
|
|
script:
|
|
|
|
- docker build --pull -t "$CI_REGISTRY_IMAGE" .
|
|
|
|
- docker push "$CI_REGISTRY_IMAGE"
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
|
2016-06-16 04:39:17 -04:00
|
|
|
build:
|
|
|
|
stage: build
|
|
|
|
script:
|
2017-07-11 08:39:38 -04:00
|
|
|
- docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
|
|
|
|
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
|
|
|
|
except:
|
|
|
|
- master
|