From 3c5ac88462aafc31d37c7f5e8311efe005e7b4cb Mon Sep 17 00:00:00 2001 From: Benjamin Schimke Date: Fri, 5 Jul 2024 17:40:00 +0200 Subject: [PATCH] fixup artifact handling --- .github/workflows/e2e.yaml | 55 +++++++++++++------------------------- 1 file changed, 19 insertions(+), 36 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 1148d2d3..2f4e00b4 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -21,41 +21,25 @@ jobs: sudo snap install kubectl --classic - name: Build provider images run: sudo make docker-build-e2e - - name: Cleanup space - # Github runners are tight on space and will fail if we don't clean up before. - run: sudo docker builder prune -f - - name: Build images + - name: Build k8s-snap image run: | cd templates/docker sudo docker build . -t k8s-snap:dev - - name: Cleanup space - # Github runners are tight on space and will fail if we don't clean up before. + - name: Save provider image run: | - sudo docker builder prune -f - sudo rm -rf /usr/share/dotnet - sudo rm -rf /opt/ghc - sudo rm -rf "/usr/local/share/boost" - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - - name: Create docker network - run: | - sudo docker network create kind --driver=bridge -o com.docker.network.bridge.enable_ip_masquerade=true - df -h - - name: Space check - run: | - ls - df -h - pwd - - name: Increase inotify watches + sudo docker save -o provider-images.tar ghcr.io/canonical/cluster-api-k8s/controlplane-controller:dev ghcr.io/canonical/cluster-api-k8s/bootstrap-controller:dev + sudo chmod 775 provider-images.tar + - name: Save k8s-snap image run: | - # Prevents https://cluster-api.sigs.k8s.io/user/troubleshooting#cluster-api-with-docker----too-many-open-files - sudo sysctl fs.inotify.max_user_watches=1048576 - sudo sysctl fs.inotify.max_user_instances=8192 + sudo docker save -o k8s-snap-image.tar k8s-snap:dev + sudo chmod 775 k8s-snap-image.tar - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: e2e-images path: | - /var/lib/docker + provider-images.tar + k8s-snap-image.tar run-e2e-tests: name: Run E2E Tests @@ -67,22 +51,21 @@ jobs: steps: - name: Check out repo uses: actions/checkout@v4 - - name: Download artifacts - uses: actions/download-artifact@v3 - with: - name: e2e-images - path: /var/lib/docker - name: Install requirements run: | sudo apt install make sudo snap install go --classic sudo apt install docker-buildx sudo snap install kubectl --classic - - name: Load docker images - run: | - for image in $(ls /var/lib/docker); do - sudo docker load -i /var/lib/docker/$image - done + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: e2e-images + path: . + - name: Load provider image + run: sudo docker load -i provider-images.tar + - name: Load k8s-snap image + run: sudo docker load -i k8s-snap-image.tar - name: Create docker network run: | sudo docker network create kind --driver=bridge -o com.docker.network.bridge.enable_ip_masquerade=true