Cache our builds based on branches - part 2
This commit is contained in:
parent
e31d600b09
commit
ea8f8a2334
@ -7,7 +7,7 @@ stages:
|
|||||||
variables:
|
variables:
|
||||||
BRANCH: plus
|
BRANCH: plus
|
||||||
VERSION: 7.1-fpm-${BRANCH}
|
VERSION: 7.1-fpm-${BRANCH}
|
||||||
CACHETAG: build
|
CACHETAG: build-${BRANCH}
|
||||||
DOCKER_REGISTRY: registry.leenooks.net
|
DOCKER_REGISTRY: registry.leenooks.net
|
||||||
DOCKER_HOST: tcp://${DOCKER_REGISTRY}-leenooks-ci-docker:2375
|
DOCKER_HOST: tcp://${DOCKER_REGISTRY}-leenooks-ci-docker:2375
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ build:
|
|||||||
- docker pull ${CI_REGISTRY_IMAGE}:${CACHETAG} || true
|
- docker pull ${CI_REGISTRY_IMAGE}:${CACHETAG} || true
|
||||||
- docker build --cache-from ${CI_REGISTRY_IMAGE}:${CACHETAG} -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:${CACHETAG} .
|
- docker build --cache-from ${CI_REGISTRY_IMAGE}:${CACHETAG} -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:${CACHETAG} .
|
||||||
- docker push ${CI_REGISTRY_IMAGE}:${VERSION}
|
- docker push ${CI_REGISTRY_IMAGE}:${VERSION}
|
||||||
- docker push ${CI_REGISTRY_IMAGE}:${CACHETAG}-${BRANCH}
|
- docker push ${CI_REGISTRY_IMAGE}:${CACHETAG}
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
only:
|
only:
|
||||||
|
Loading…
Reference in New Issue
Block a user