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:
Chris Evich
2022-12-05 08:17:44 -05:00
parent 51ce5e4e0a
commit 4c1af406f7

View File

@@ -47,6 +47,8 @@ build:
echo "Building/Pushing to: ${CI_REGISTRY_IMAGE}:${IMAGE_TAG}";
- >-
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.revision=$CI_COMMIT_SHA" \
--label "org.opencontainers.image.created=$CI_JOB_STARTED_AT" \