Merge pull request #6224 from overleaf/jpa-cache-install-deps

[misc] add docker image caching for install_deps, pre-fetch node image

GitOrigin-RevId: b52e52351c62b780538e0668b99fc1c28723addc
This commit is contained in:
Jakob Ackermann
2022-01-05 10:58:48 +00:00
committed by Copybot
parent b1eac3abde
commit 729cbf3fce
20 changed files with 56 additions and 17 deletions

View File

@@ -84,8 +84,21 @@ ifneq (,$(wildcard test/acceptance/js/scripts/pre-run))
endif
build:
docker pull gcr.io/overleaf-ops/$(PROJECT_NAME):$(BRANCH_NAME)-deps \
|| docker pull gcr.io/overleaf-ops/$(PROJECT_NAME):main-deps \
|| echo 'nothing cached'
docker build \
--pull \
--tag gcr.io/overleaf-ops/$(PROJECT_NAME):$(BRANCH_NAME)-deps \
--cache-from gcr.io/overleaf-ops/$(PROJECT_NAME):$(BRANCH_NAME)-deps \
--cache-from gcr.io/overleaf-ops/$(PROJECT_NAME):main-deps \
--target base \
--file Dockerfile \
.
docker build --pull --tag ci/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) \
--tag gcr.io/overleaf-ops/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) \
--cache-from gcr.io/overleaf-ops/$(PROJECT_NAME):$(BRANCH_NAME)-deps \
.
tar: