diff --git a/build/Makefile b/build/Makefile index 4dbadedf3..3abb52372 100644 --- a/build/Makefile +++ b/build/Makefile @@ -273,7 +273,7 @@ shell: ensure-gcloud-dirs ensure-kube-dirs ensure-build-image --entrypoint=bash $(BUILD_IMAGE_TAG) ensure-build-image: ensure-cargo-registry - docker build $(BUILD_IMAGE_ARG) --build-arg RUST_TOOLCHAIN=$(rust_toolchain) --tag=$(BUILD_IMAGE_TAG) $(build_path)/build-image/ + docker buildx build $(BUILD_IMAGE_ARG) --cache-to type=inline --cache-from type=registry,ref=$(BUILD_IMAGE_TAG) --build-arg RUST_TOOLCHAIN=$(rust_toolchain) --tag=$(BUILD_IMAGE_TAG) $(build_path)/build-image/ ensure-cargo-registry: -mkdir -p $(CARGO_HOME)/registry diff --git a/cloudbuild.yaml b/cloudbuild.yaml index 93d454065..0110689b2 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -103,7 +103,6 @@ options: - "CARGO_HOME=/workspace/.cargo" - "REPOSITORY=${_REPOSITORY}" - "BUILD_IMAGE_TAG=${_BUILD_IMAGE_TAG}" - - "BUILD_IMAGE_ARG=--cache-from ${_BUILD_IMAGE_TAG}" machineType: E2_HIGHCPU_32 dynamic_substitutions: true timeout: 7200s