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