From d48b47c8e58c7ba29a036d69f2194a82762cd69f Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Fri, 14 Jul 2023 01:31:33 -0400 Subject: [PATCH] Add auto-cleaning of the shared cargo cache. --- .lighthouse/pipeline-rust-test.yaml | 15 +++++++++++++++ docker/organic_test/Dockerfile | 1 + 2 files changed, 16 insertions(+) diff --git a/.lighthouse/pipeline-rust-test.yaml b/.lighthouse/pipeline-rust-test.yaml index f456da2..70e95ee 100644 --- a/.lighthouse/pipeline-rust-test.yaml +++ b/.lighthouse/pipeline-rust-test.yaml @@ -164,6 +164,21 @@ spec: value: failure - name: TARGET_URL value: "https://tekton.fizz.buzz/#/namespaces/$(context.pipelineRun.namespace)/pipelineruns/$(context.pipelineRun.name)" + - name: cargo-cache-autoclean + taskRef: + name: run-docker-image + workspaces: + - name: source + workspace: git-source + - name: cargo-cache + workspace: cargo-cache + params: + - name: command + value: [cargo, cache, --autoclean] + - name: args + value: [] + - name: docker-image + value: "$(params.image-name):$(tasks.fetch-repository.results.commit)" workspaces: - name: git-source - name: docker-credentials diff --git a/docker/organic_test/Dockerfile b/docker/organic_test/Dockerfile index 6901095..e6e4e59 100644 --- a/docker/organic_test/Dockerfile +++ b/docker/organic_test/Dockerfile @@ -1,3 +1,4 @@ FROM rustlang/rust:nightly-alpine3.17 RUN apk add --no-cache musl-dev emacs +RUN cargo install --locked cargo-cache