Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ jobs:
build:
if: github.event_name == 'schedule' || github.event_name == 'push' || github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id
uses: ./.github/workflows/build.yml
e2e:
if: github.event_name == 'schedule' || github.event_name == 'push' || github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id
uses: ./.github/workflows/e2e.yml
# Virtual job that can be configured as a required check before a PR can be merged.
all-required-checks-done:
name: All required checks done
Expand All @@ -40,6 +43,7 @@ jobs:
- test
- codeql
- build
- e2e
runs-on: ubuntu-latest
steps:
- run: echo "All required checks done"
23 changes: 23 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: End2End tests

on:
workflow_call:

permissions:
contents: read

jobs:
kind:
name: Kind
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Go
id: setup-go
uses: ./.github/actions/setup-go-cache
with:
cache-prefix: go-integration-kind

- name: E2E test
run: ./scripts/e2e-test.sh
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,12 @@ ifndef ignore-not-found
ignore-not-found = false
endif

.PHONY: kind-all
kind-all: kind-create-cluster install-and-wait-cert-manager helm-repos helm-install install-armada-deps wait-for-armada-deps create-armada-namespace apply-armada-crs create-armadactl-config apply-default-priority-class get-armadactl ## Install everything

.PHONY: kind-all-local
kind-all-local: kind-create-cluster install-and-wait-cert-manager helm-repos helm-install-local install-armada-deps wait-for-armada-deps create-armada-namespace apply-armada-crs create-armadactl-config apply-default-priority-class get-armadactl ## Install everything from sources

.PHONY: kind-all-dev
kind-all-dev: kind-create-cluster kind-deploy helm-repos install-armada-deps wait-for-armada-deps create-armada-namespace apply-armada-crs create-armadactl-config apply-default-priority-class get-armadactl ## Install everything with Operator built from scratch

Expand Down
33 changes: 17 additions & 16 deletions scripts/e2e-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,27 @@ log() {
echo -e "${GREEN}$1${NC}"
}

log "Running e2e tests..."

log "Creating kind cluster..."
make kind-create-cluster
armadactl-retry() {
for i in {1..60}; do
if armadactl "$@"; then
return 0
fi
sleep 1
done
echo "armadactl command failed after 60 attempts" >&2
exit 1
}

log "Installing cert-manager..."
make install-and-wait-cert-manager
log "Running e2e tests..."

log "Building latest version of the operator and installing it via Helm..."
make helm-install-local
log "Creating test environment cluster..."
make kind-all-local

for i in {1..5}; do
kubectl get pods -n armada-system
kubectl describe deployment armada-operator-controller-manager -n armada-system
sleep 15
kubectl logs deployment/armada-operator-controller-manager -n armada-system
done
log "Creating test queue..."
armadactl-retry create queue example

log "Waiting for Armada Operator pod to be ready..."
kubectl wait --for='condition=Ready' pods -l 'app.kubernetes.io/name=armada-operator' --timeout=600s --namespace armada-system
log "Submitting job..."
armadactl-retry submit dev/quickstart/example-job.yaml

log "Deleting kind cluster..."
make kind-delete-cluster
Loading