Cache builder stage
This commit is contained in:
parent
19fc9ef182
commit
1c1d2d07f6
@ -9,6 +9,7 @@ stages:
|
|||||||
variables:
|
variables:
|
||||||
DOCKER_HOST: tcp://docker:2375
|
DOCKER_HOST: tcp://docker:2375
|
||||||
DOCKER_DRIVER: overlay2
|
DOCKER_DRIVER: overlay2
|
||||||
|
CONTAINER_BUILDER_IMAGE: $CI_REGISTRY_IMAGE:builder-latest
|
||||||
CONTAINER_TEST_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
|
CONTAINER_TEST_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
|
||||||
CONTAINER_RELEASE_IMAGE: $CI_REGISTRY_IMAGE:latest
|
CONTAINER_RELEASE_IMAGE: $CI_REGISTRY_IMAGE:latest
|
||||||
CONTAINER_TAG_IMAGE: $CI_REGISTRY_IMAGE:${CI_COMMIT_TAG:1}
|
CONTAINER_TAG_IMAGE: $CI_REGISTRY_IMAGE:${CI_COMMIT_TAG:1}
|
||||||
@ -22,6 +23,8 @@ build:
|
|||||||
- docker pull $CONTAINER_TEST_IMAGE || true
|
- docker pull $CONTAINER_TEST_IMAGE || true
|
||||||
- docker pull $CONTAINER_RELEASE_IMAGE || true
|
- docker pull $CONTAINER_RELEASE_IMAGE || true
|
||||||
- docker pull $CONTAINER_TAG_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 build --pull -t $CONTAINER_TEST_IMAGE .
|
||||||
- docker push $CONTAINER_TEST_IMAGE
|
- docker push $CONTAINER_TEST_IMAGE
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user