Skip to content

Commit

Permalink
fixup artifact handling
Browse files Browse the repository at this point in the history
  • Loading branch information
bschimke95 committed Jul 5, 2024
1 parent 0231f9a commit 3c5ac88
Showing 1 changed file with 19 additions and 36 deletions.
55 changes: 19 additions & 36 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 3c5ac88

Please sign in to comment.