From a394798b75af27c9281026af61c3f186fb3c3b66 Mon Sep 17 00:00:00 2001 From: Jeremi Piotrowski Date: Fri, 17 Mar 2023 17:41:33 +0100 Subject: [PATCH 1/2] kata-deploy: Remove temporary directory after creating tarball The various tarballs are unpacked into a temporary directory, and then that directory is compressed into kata-static.tar.xz. After we have the tarball, there is no reason to keep the temporary directory. Dispose of it as the last step. Fixes: #6490 Signed-off-by: Jeremi Piotrowski --- .../kata-deploy/local-build/kata-deploy-merge-builds.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/packaging/kata-deploy/local-build/kata-deploy-merge-builds.sh b/tools/packaging/kata-deploy/local-build/kata-deploy-merge-builds.sh index d99c49b4e2..a2e994849b 100755 --- a/tools/packaging/kata-deploy/local-build/kata-deploy-merge-builds.sh +++ b/tools/packaging/kata-deploy/local-build/kata-deploy-merge-builds.sh @@ -25,4 +25,5 @@ done echo "create ${tar_path}" (cd "${tarball_content_dir}"; tar cvfJ "${tar_path}" .) +rm -rf "${tarball_content_dir}" popd From 26f80ff468e646a1867d1151e203c92530f1cb89 Mon Sep 17 00:00:00 2001 From: Jeremi Piotrowski Date: Fri, 17 Mar 2023 17:44:56 +0100 Subject: [PATCH 2/2] workflows: kata-deploy-push: Remove unneeded tools from runner `make kata-tarball` needs a lot of disk space and github action runners don't have that much of it. Remove unneeded tools from the runner, which frees another ~10GB of space. Fixes: #6490 Signed-off-by: Jeremi Piotrowski --- .github/workflows/kata-deploy-push.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/kata-deploy-push.yaml b/.github/workflows/kata-deploy-push.yaml index ce45ab5abe..9b5fb4c0d0 100644 --- a/.github/workflows/kata-deploy-push.yaml +++ b/.github/workflows/kata-deploy-push.yaml @@ -72,6 +72,10 @@ jobs: make-kata-tarball: runs-on: ubuntu-latest steps: + - name: Free disk space + run: | + sudo rm -rf /usr/share/dotnet + sudo rm -rf "$AGENT_TOOLSDIRECTORY" - uses: actions/checkout@v2 - name: make kata-tarball if: ${{ !contains(github.event.pull_request.labels.*.name, 'force-skip-ci') }}