Skip to content

Commit

Permalink
add debug action
Browse files Browse the repository at this point in the history
  • Loading branch information
eaudetcobello committed Sep 9, 2024
1 parent 0f2f9c5 commit f42029d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/e2e-deleteme.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
14 changes: 9 additions & 5 deletions hack/ci-e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 {
Expand Down Expand Up @@ -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/
Expand All @@ -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"
Expand Down

0 comments on commit f42029d

Please sign in to comment.