Testing gitlab running caching

This commit is contained in:
Deon George 2017-07-22 22:20:28 +10:00
parent 7645ad427c
commit 3777a1bd07

View File

@ -17,6 +17,7 @@ before_script:
- docker info - docker info
- docker version - docker version
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN ${DOCKER_REGISTRY} - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN ${DOCKER_REGISTRY}
- echo CI_PROJECT_PATH: ${CI_PROJECT_PATH} CI_BUILD_REF: ${CI_BUILD_REF}
test: test:
stage: test stage: test
@ -31,9 +32,10 @@ test:
build: build:
stage: build stage: build
script: script:
- docker build -t ${DOCKER_IMAGE}:${VERSION} . - docker build --cache-from ${DOCKER_REGISTRY}/${DOCKER_IMAGE}:latest -t ${DOCKER_IMAGE}:${VERSION} -t ${DOCKER_IMAGE}:CI_BUILD .
- docker tag ${DOCKER_IMAGE}:${VERSION} ${DOCKER_REGISTRY}/${DOCKER_IMAGE}:${VERSION} - docker tag ${DOCKER_IMAGE}:${VERSION} ${DOCKER_REGISTRY}/${DOCKER_IMAGE}:${VERSION}
- docker push ${DOCKER_REGISTRY}/${DOCKER_IMAGE}:${VERSION} - docker push ${DOCKER_REGISTRY}/${DOCKER_IMAGE}:${VERSION}
- docker push ${DOCKER_REGISTRY}/${DOCKER_IMAGE}:CI_BUILD
tags: tags:
- docker - docker
only: only: