-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
33ef8d5
commit f74ddc3
Showing
18 changed files
with
216 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
name: E2E Tests | ||
|
||
on: | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build-e2e-images: | ||
name: Build & Run E2E Images | ||
runs-on: [self-hosted, linux, X64, jammy, large] | ||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v4 | ||
- name: Install requirements | ||
run: | | ||
sudo apt update | ||
sudo snap install go --classic --channel=1.22/stable | ||
sudo apt install make | ||
sudo apt install docker-buildx | ||
sudo snap install kubectl --classic --channel=1.30/stable | ||
- name: Build provider images | ||
run: sudo make docker-build-e2e | ||
- name: Build k8s-snap image | ||
run: | | ||
cd templates/docker | ||
sudo docker build . -t k8s-snap:dev | ||
- name: Save provider image | ||
run: | | ||
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: | | ||
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@v4 | ||
with: | ||
name: e2e-images | ||
path: | | ||
provider-images.tar | ||
k8s-snap-image.tar | ||
run-e2e-tests: | ||
name: Run E2E Tests | ||
runs-on: [self-hosted, linux, X64, jammy, large] | ||
needs: build-e2e-images | ||
strategy: | ||
matrix: | ||
ginkgo_focus: | ||
- "KCP remediation" | ||
- "MachineDeployment remediation" | ||
- "Workload cluster creation" | ||
- "Workload cluster scaling" | ||
- "Workload cluster upgrade" | ||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v4 | ||
- name: Install requirements | ||
run: | | ||
sudo apt update | ||
sudo snap install go --classic --channel=1.22/stable | ||
sudo apt install make | ||
sudo apt install docker-buildx | ||
sudo snap install kubectl --classic --channel=1.30/stable | ||
- 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 | ||
- name: Increase inotify watches | ||
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 | ||
- name: Run e2e tests | ||
run: | | ||
sudo GINKGO_FOCUS="${{ matrix.ginkgo_focus }}" SKIP_RESOURCE_CLEANUP=true make test-e2e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
bootstrap/config/samples/bootstrap_v1alpha3_ck8sconfigtemplate.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
controlplane/config/samples/controlplane_v1alpha3_ck8scontrolplane.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.