Testing gitlab running caching
This commit is contained in:
parent
7645ad427c
commit
3777a1bd07
@ -17,6 +17,7 @@ before_script:
|
||||
- docker info
|
||||
- docker version
|
||||
- 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:
|
||||
stage: test
|
||||
@ -31,9 +32,10 @@ test:
|
||||
build:
|
||||
stage: build
|
||||
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 push ${DOCKER_REGISTRY}/${DOCKER_IMAGE}:${VERSION}
|
||||
- docker push ${DOCKER_REGISTRY}/${DOCKER_IMAGE}:CI_BUILD
|
||||
tags:
|
||||
- docker
|
||||
only:
|
||||
|
Loading…
Reference in New Issue
Block a user