diff --git a/.github/workflows/e2e-deleteme.yaml b/.github/workflows/e2e-deleteme.yaml index 68464b68..2cdbe24f 100644 --- a/.github/workflows/e2e-deleteme.yaml +++ b/.github/workflows/e2e-deleteme.yaml @@ -9,7 +9,7 @@ permissions: jobs: run-e2e-tests: name: Run E2E Tests - runs-on: [self-hosted, linux, X64, jammy, large] + runs-on: ubuntu-latest strategy: matrix: ginkgo_focus: @@ -21,6 +21,10 @@ jobs: steps: - name: Check out repo uses: actions/checkout@v4 + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 + with: + detached: true - name: Install requirements run: | sudo apt install make diff --git a/hack/ci-e2e-tests.sh b/hack/ci-e2e-tests.sh index f193697a..09efba24 100755 --- a/hack/ci-e2e-tests.sh +++ b/hack/ci-e2e-tests.sh @@ -20,7 +20,7 @@ readonly SKIP_CLEANUP=${1:-true} readonly INFRA_PROVIDER=${2:-aws} readonly CK8S_PROVIDER_VERSION=${3:-v0.1.2} -readonly LXD_CHANNEL="5.21/stable" +readonly LXD_CHANNEL="6.1/stable" readonly LXC_IMAGE="ubuntu:20.04" readonly K8S_PROFILE_URL="https://raw.githubusercontent.com/canonical/k8s-snap/main/tests/integration/lxd-profile.yaml" readonly K8S_PROFILE_PATH="/tmp/k8s.profile" @@ -40,11 +40,13 @@ function check_required_env_vars { required_env_vars+=("AWS_REGION" "AWS_ACCESS_KEY_ID" "AWS_SECRET_ACCESS_KEY") fi + set +x for var in "${required_env_vars[@]}"; do if [ -z "${!var}" ]; then error_exit "Missing required environment variable: $var" fi done + set -x } function exec_in_container { @@ -75,6 +77,7 @@ function setup_container { exec_in_container "apt update && apt install -y snapd" exec_in_container "systemctl start snapd" + exec_in_container "snap wait core seed.loaded" # Script is running from the hack directory, so push the entire directory to the container lxc file push -r .. $CONTAINER_NAME/root/ @@ -100,10 +103,11 @@ function configure_container_env { # Main installation and configuration function setup_management_cluster { - sleep 5 - exec_in_container "snap install k8s --classic --edge" - sleep 1 - exec_in_container "snap install go --classic" + sleep 15 + exec_in_container "sudo snap install k8s --classic --edge || true" + exec_in_container "sudo snap install k8s --classic --edge || true" + exec_in_container "sudo snap install k8s --classic --edge" + exec_in_container "sudo snap install go --classic" exec_in_container "mkdir -p /root/.kube" exec_in_container "sudo k8s bootstrap" exec_in_container "sudo k8s status --wait-ready"