-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Showing
41 changed files
with
1,056 additions
and
342 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
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,29 @@ | ||
#!/usr/bin/env bash | ||
set -eux pipefail | ||
|
||
# Github Actions does not provide either: | ||
# | ||
# 1. Any way to re-use YAML. | ||
# 2. Re-run a single job in a workflow. | ||
# | ||
# So this script auto-generates E2E workflows so they can be re-run. | ||
|
||
cd $(dirname $0) | ||
|
||
gen() { | ||
sed "s/name: E2E/name: $1/" < e2e.yaml.0 | | ||
sed "s/\${{matrix.test}}/$2/g" | | ||
sed "s/\${{matrix.containerRuntimeExecutor}}/$3/g" | | ||
../../hack/auto-gen-msg.sh > $2-$3.yaml | ||
} | ||
|
||
gen "Test Docker Executor" test-executor docker | ||
gen "Test Emissary Executor" test-executor emissary | ||
gen "Test K8SAPI Executor" test-executor k8sapi | ||
gen "Test Kubelet Executor" test-executor kubelet | ||
gen "Test PNS Executor" test-executor pns | ||
|
||
gen "Test CLI" test-cli docker | ||
gen "Test Cron Workflows" test-e2e-cron docker | ||
gen "Test Examples" test-examples docker | ||
gen "Test Functionality " test-functional docker |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: E2E | ||
on: | ||
push: | ||
branches: | ||
- "master" | ||
- "release-*" | ||
- "!release-2.8" | ||
pull_request: | ||
branches: | ||
- "master" | ||
|
||
jobs: | ||
|
||
e2e-tests: | ||
name: Test | ||
runs-on: ubuntu-20.04 | ||
timeout-minutes: 20 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: "1.15.7" | ||
- uses: actions/cache@v2 | ||
with: | ||
path: /home/runner/.cache/go-build | ||
key: GOCACHE-v2-${{ hashFiles('**/go.mod') }} | ||
- uses: actions/cache@v2 | ||
with: | ||
path: /home/runner/go/pkg/mod | ||
key: GOMODCACHE-v2-${{ hashFiles('**/go.mod') }} | ||
- uses: actions/cache@v2 | ||
with: | ||
path: /home/runner/go/bin | ||
key: go-bin-v1-${{ hashFiles('**/go.mod') }} | ||
- uses: actions/cache@v2 | ||
with: | ||
path: dist/kustomize | ||
key: kustomize | ||
- run: make pull-images & | ||
- name: Install and start K3S v1.18.8+k3s1 | ||
run: curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.18.8+k3s1 INSTALL_K3S_CHANNEL=stable INSTALL_K3S_EXEC=--docker K3S_KUBECONFIG_MODE=644 sh - & | ||
- name: Create Kubeconfig | ||
run: | | ||
mkdir -p ~/.kube | ||
until stat /etc/rancher/k3s/k3s.yaml ; do sleep 10s ; done | ||
cat /etc/rancher/k3s/k3s.yaml | sed "s/127.0.0.1/$(hostname)/g" > ~/.kube/config | ||
echo "- name: fake_token_user" >> ~/.kube/config | ||
echo " user:" >> ~/.kube/config | ||
echo " token: xxxxxx" >> ~/.kube/config | ||
- run: git fetch --tags | ||
- name: Start Argo | ||
run: | | ||
echo '127.0.0.1 dex' | sudo tee -a /etc/hosts | ||
echo '127.0.0.1 minio' | sudo tee -a /etc/hosts | ||
echo '127.0.0.1 postgres' | sudo tee -a /etc/hosts | ||
echo '127.0.0.1 mysql' | sudo tee -a /etc/hosts | ||
PROFILE=mysql | ||
ALWAYS_OFFLOAD_NODE_STATUS=true | ||
if [ "${{matrix.test}}" = test-executor ] || [ "${{matrix.test}}" = test-examples ]; then | ||
PROFILE=minimal | ||
ALWAYS_OFFLOAD_NODE_STATUS=false | ||
fi | ||
mkdir -p /tmp/log/argo-e2e | ||
KUBECONFIG=~/.kube/config make install PROFILE=$PROFILE E2E_EXECUTOR=${{matrix.containerRuntimeExecutor}} ALWAYS_OFFLOAD_NODE_STATUS=${ALWAYS_OFFLOAD_NODE_STATUS} STATIC_FILES=false DEV_IMAGE=true | ||
KUBECONFIG=~/.kube/config make start PROFILE=$PROFILE E2E_EXECUTOR=${{matrix.containerRuntimeExecutor}} ALWAYS_OFFLOAD_NODE_STATUS=${ALWAYS_OFFLOAD_NODE_STATUS} STATIC_FILES=false DEV_IMAGE=true 2>&1 > /tmp/log/argo-e2e/argo.log & | ||
- run: make wait | ||
- name: Start logging | ||
run: make logs 2>&1 > /tmp/log/argo-e2e/pod.log & | ||
- run: make ${{matrix.test}} | ||
- name: Upload logs | ||
if: ${{ failure() }} | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: ${{matrix.test}}-${{matrix.containerRuntimeExecutor}} | ||
path: /tmp/log/argo-e2e |
Oops, something went wrong.