Cache prior build layers for ~5 days
This vastly improves build performance at the cost of some extra registry server storage (which there is plenty of). Note: The cache TTL needs to be coordinated with the registry server's tag-cleanup policy. Signed-off-by: Chris Evich <chris_gitlab@icuc.me>
This commit is contained in:
@@ -47,6 +47,8 @@ build:
|
|||||||
echo "Building/Pushing to: ${CI_REGISTRY_IMAGE}:${IMAGE_TAG}";
|
echo "Building/Pushing to: ${CI_REGISTRY_IMAGE}:${IMAGE_TAG}";
|
||||||
- >-
|
- >-
|
||||||
buildah build \
|
buildah build \
|
||||||
|
--layers --cache-from "${CI_REGISTRY_IMAGE}" \
|
||||||
|
--cache-to "${CI_REGISTRY_IMAGE}" --cache-ttl=128h \
|
||||||
--label "org.opencontainers.image.source=${CI_PROJECT_URL}" \
|
--label "org.opencontainers.image.source=${CI_PROJECT_URL}" \
|
||||||
--label "org.opencontainers.image.revision=$CI_COMMIT_SHA" \
|
--label "org.opencontainers.image.revision=$CI_COMMIT_SHA" \
|
||||||
--label "org.opencontainers.image.created=$CI_JOB_STARTED_AT" \
|
--label "org.opencontainers.image.created=$CI_JOB_STARTED_AT" \
|
||||||
|
|||||||
Reference in New Issue
Block a user