Final build cache config

This commit is contained in:
Deon George 2018-08-24 15:54:53 +10:00
parent ed93c84279
commit f8bb545f90

View File

@ -6,7 +6,7 @@ stages:
variables:
VERSION: 1.12a39-${CI_COMMIT_REF_NAME}
CACHETAG: build
CACHETAG: build-${CI_COMMIT_REF_NAME}
DOCKER_HOST: tcp://docker:2375
services:
@ -34,9 +34,9 @@ build:
script:
- if [ -f init ]; then chmod 500 init; fi
- 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}-${CI_COMMIT_REF_NAME} .
- 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}:${CACHETAG}-${CI_COMMIT_REF_NAME}
- docker push ${CI_REGISTRY_IMAGE}:${CACHETAG}
tags:
- docker-armv7l
only: