Cache builder stage

This commit is contained in:
Valentin Brandl 2019-04-24 00:28:54 +02:00
parent 19fc9ef182
commit 1c1d2d07f6
No known key found for this signature in database
GPG Key ID: 30D341DD34118D7D

View File

@ -9,6 +9,7 @@ stages:
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
CONTAINER_BUILDER_IMAGE: $CI_REGISTRY_IMAGE:builder-latest
CONTAINER_TEST_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
CONTAINER_RELEASE_IMAGE: $CI_REGISTRY_IMAGE:latest
CONTAINER_TAG_IMAGE: $CI_REGISTRY_IMAGE:${CI_COMMIT_TAG:1}
@ -22,6 +23,8 @@ build:
- docker pull $CONTAINER_TEST_IMAGE || true
- docker pull $CONTAINER_RELEASE_IMAGE || true
- docker pull $CONTAINER_TAG_IMAGE || true
- docker pull $CONTAINER_BUILDER_IMAGE || true
- docker build --pull -t $CONTAINER_BUILDER_IMAGE --target builder .
- docker build --pull -t $CONTAINER_TEST_IMAGE .
- docker push $CONTAINER_TEST_IMAGE