From 999a5e5bf67ece6f5def1b6516e76a5d844328f5 Mon Sep 17 00:00:00 2001 From: Deon George Date: Sun, 5 Feb 2023 00:47:39 +1100 Subject: [PATCH] Change our build cache to build-cache\ --- .gitlab-ci.yml | 4 ++-- .gitlab-docker-arm64.yml | 5 +++-- .gitlab-docker-armv7l.yml | 5 +++-- .gitlab-docker-x86_64.yml | 5 +++-- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e7b6172..e4b45bf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,14 +13,14 @@ variables: cache: key: ${CI_JOB_NAME_SLUG}-${CI_COMMIT_REF_SLUG} paths: - - docker/ + - build-cache image: docker:latest services: - docker:dind before_script: -- if [ ! -d docker ]; then mkdir docker; fi +- if [ ! -d build-cache ]; then mkdir build-cache; fi - sed -ie s'/https/http/' /etc/apk/repositories - HTTP_PROXY=http://proxy.dege.lan:3128 apk add git curl - docker info diff --git a/.gitlab-docker-arm64.yml b/.gitlab-docker-arm64.yml index 0b1aa3c..b2a780e 100644 --- a/.gitlab-docker-arm64.yml +++ b/.gitlab-docker-arm64.yml @@ -4,10 +4,11 @@ arm64:build: stage: build script: - if [ -f init ]; then chmod 500 init; fi - - ([ -z "$REFRESH" -a -f docker/${CI_COMMIT_REF_SLUG} ]) && docker load < docker/${CI_COMMIT_REF_SLUG} || true + - ([ -z "$REFRESH" -a -f build-cache/${CI_COMMIT_REF_SLUG} ]) && docker load < build-cache/${CI_COMMIT_REF_SLUG} || true + - rm build-cache/* || true - docker build --build-arg HTTP_PROXY=http://proxy.dege.lan:3128 --cache-from ${CI_REGISTRY_IMAGE}:${VERSIONARCH} -t ${CI_REGISTRY_IMAGE}:${VERSIONARCH} . - docker push ${CI_REGISTRY_IMAGE}:${VERSIONARCH} - - docker save ${CI_REGISTRY_IMAGE}:${VERSIONARCH} > docker/${CI_COMMIT_REF_SLUG} + - docker save ${CI_REGISTRY_IMAGE}:${VERSIONARCH} > build-cache/${CI_COMMIT_REF_SLUG} tags: - docker - arm64 diff --git a/.gitlab-docker-armv7l.yml b/.gitlab-docker-armv7l.yml index 590e519..49a34a4 100644 --- a/.gitlab-docker-armv7l.yml +++ b/.gitlab-docker-armv7l.yml @@ -4,10 +4,11 @@ armv7l:build: stage: build script: - if [ -f init ]; then chmod 500 init; fi - - ([ -z "$REFRESH" -a -f docker/${CI_COMMIT_REF_SLUG} ]) && docker load < docker/${CI_COMMIT_REF_SLUG} || true + - ([ -z "$REFRESH" -a -f build-cache/${CI_COMMIT_REF_SLUG} ]) && docker load < build-cache/${CI_COMMIT_REF_SLUG} || true + - rm build-cache/* || true - docker build --build-arg HTTP_PROXY=http://proxy.dege.lan:3128 --cache-from ${CI_REGISTRY_IMAGE}:${VERSIONARCH} -t ${CI_REGISTRY_IMAGE}:${VERSIONARCH} . - docker push ${CI_REGISTRY_IMAGE}:${VERSIONARCH} - - docker save ${CI_REGISTRY_IMAGE}:${VERSIONARCH} > docker/${CI_COMMIT_REF_SLUG} + - docker save ${CI_REGISTRY_IMAGE}:${VERSIONARCH} > build-cache/${CI_COMMIT_REF_SLUG} tags: - docker - armv7l diff --git a/.gitlab-docker-x86_64.yml b/.gitlab-docker-x86_64.yml index 44b1471..6786754 100644 --- a/.gitlab-docker-x86_64.yml +++ b/.gitlab-docker-x86_64.yml @@ -4,10 +4,11 @@ x86_64:build: stage: build script: - if [ -f init ]; then chmod 500 init; fi - - ([ -z "$REFRESH" -a -f docker/${CI_COMMIT_REF_SLUG} ]) && docker load < docker/${CI_COMMIT_REF_SLUG} || true + - ([ -z "$REFRESH" -a -f build-cache/${CI_COMMIT_REF_SLUG} ]) && docker load < build-cache/${CI_COMMIT_REF_SLUG} || true + - rm build-cache/* || true - docker build --build-arg HTTP_PROXY=http://proxy.dege.lan:3128 --cache-from ${CI_REGISTRY_IMAGE}:${VERSIONARCH} -t ${CI_REGISTRY_IMAGE}:${VERSIONARCH} . - docker push ${CI_REGISTRY_IMAGE}:${VERSIONARCH} - - docker save ${CI_REGISTRY_IMAGE}:${VERSIONARCH} > docker/${CI_COMMIT_REF_SLUG} + - docker save ${CI_REGISTRY_IMAGE}:${VERSIONARCH} > build-cache/${CI_COMMIT_REF_SLUG} tags: - docker - x86_64