From 36d38f36e84f3cd6f4f3f9a150e9aac7a01961e9 Mon Sep 17 00:00:00 2001 From: Vladyslav Diachenko Date: Thu, 8 Aug 2024 15:11:44 +0300 Subject: [PATCH] updated release workflows to clean up the cache before running job `dist`. it's needed because it's failing with error: `no space left on device` Signed-off-by: Vladyslav Diachenko --- .github/jsonnetfile.json | 2 +- .github/jsonnetfile.lock.json | 4 ++-- .../github.com/grafana/loki-release/workflows/build.libsonnet | 1 + .../grafana/loki-release/workflows/common.libsonnet | 4 ++++ .github/workflows/minor-release-pr.yml | 2 ++ .github/workflows/patch-release-pr.yml | 2 ++ 6 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/jsonnetfile.json b/.github/jsonnetfile.json index 2eb94153d1d1..1038aebdcd66 100644 --- a/.github/jsonnetfile.json +++ b/.github/jsonnetfile.json @@ -8,7 +8,7 @@ "subdir": "workflows" } }, - "version": "adca1c07a2199374e1646e62331926509699368b" + "version": "87cb5090c36b5332e7f21b5c59e136962d5f4f56" } ], "legacyImports": true diff --git a/.github/jsonnetfile.lock.json b/.github/jsonnetfile.lock.json index 3077ba9f2d55..9eef1872519b 100644 --- a/.github/jsonnetfile.lock.json +++ b/.github/jsonnetfile.lock.json @@ -8,8 +8,8 @@ "subdir": "workflows" } }, - "version": "adca1c07a2199374e1646e62331926509699368b", - "sum": "/6NMt3DFr1mpaBxncbwBJVV5vBpAMIyP3XNOoFArz5Q=" + "version": "87cb5090c36b5332e7f21b5c59e136962d5f4f56", + "sum": "kVlVZPpPz8d/D6UGK9Hto+NeGy7z8NvGygcB1QboxWw=" } ], "legacyImports": false diff --git a/.github/vendor/github.com/grafana/loki-release/workflows/build.libsonnet b/.github/vendor/github.com/grafana/loki-release/workflows/build.libsonnet index 1857836d6665..bd9d2e2e9b11 100644 --- a/.github/vendor/github.com/grafana/loki-release/workflows/build.libsonnet +++ b/.github/vendor/github.com/grafana/loki-release/workflows/build.libsonnet @@ -176,6 +176,7 @@ local releaseLibStep = common.releaseLibStep; dist: function(buildImage, skipArm=true, useGCR=false, makeTargets=['dist', 'packages']) job.new() + job.withSteps([ + common.cleanUpBuildCache, common.fetchReleaseRepo, common.googleAuth, common.setupGoogleCloudSdk, diff --git a/.github/vendor/github.com/grafana/loki-release/workflows/common.libsonnet b/.github/vendor/github.com/grafana/loki-release/workflows/common.libsonnet index 03f4aa112045..d989eb40f6ab 100644 --- a/.github/vendor/github.com/grafana/loki-release/workflows/common.libsonnet +++ b/.github/vendor/github.com/grafana/loki-release/workflows/common.libsonnet @@ -75,6 +75,10 @@ checkout: $.step.new('checkout', 'actions/checkout@v4'), + cleanUpBuildCache: + $.step.new('clean up build tools cache') + + $.step.withRun('rm -rf /opt/hostedtoolcache'), + fetchReleaseRepo: $.step.new('pull code to release', 'actions/checkout@v4') + $.step.with({ diff --git a/.github/workflows/minor-release-pr.yml b/.github/workflows/minor-release-pr.yml index e6527ef1250d..0d5b261e6f46 100644 --- a/.github/workflows/minor-release-pr.yml +++ b/.github/workflows/minor-release-pr.yml @@ -101,6 +101,8 @@ jobs: version: "${{ needs.version.outputs.version }}" runs-on: "ubuntu-latest" steps: + - name: "clean up build tools cache" + run: "rm -rf /opt/hostedtoolcache" - name: "pull code to release" uses: "actions/checkout@v4" with: diff --git a/.github/workflows/patch-release-pr.yml b/.github/workflows/patch-release-pr.yml index 0461ce62c3eb..5fe2e39d6ce9 100644 --- a/.github/workflows/patch-release-pr.yml +++ b/.github/workflows/patch-release-pr.yml @@ -101,6 +101,8 @@ jobs: version: "${{ needs.version.outputs.version }}" runs-on: "ubuntu-latest" steps: + - name: "clean up build tools cache" + run: "rm -rf /opt/hostedtoolcache" - name: "pull code to release" uses: "actions/checkout@v4" with: