Skip to content

Commit

Permalink
ci: Try to make CI more robust (argoproj#5633)
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Collins <[email protected]>
  • Loading branch information
alexec committed Apr 12, 2021
1 parent cc7e310 commit 54f4c26
Showing 1 changed file with 27 additions and 20 deletions.
47 changes: 27 additions & 20 deletions .github/workflows/ci-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,28 +43,39 @@ jobs:
# test-executor 8m (2m locally)
# test-functional: 13m (7m locally)
timeout-minutes: 20
env:
KUBECONFIG: /home/runner/.kubeconfig
strategy:
fail-fast: false
matrix:
include:
- test: test-api
containerRuntimeExecutor: emissary
profile: mysql
- test: test-cli
containerRuntimeExecutor: emissary
profile: mysql
- test: test-cron
containerRuntimeExecutor: emissary
profile: minimal
- test: test-executor
containerRuntimeExecutor: docker
profile: minimal
- test: test-executor
containerRuntimeExecutor: emissary
profile: minimal
- test: test-executor
containerRuntimeExecutor: k8sapi
profile: minimal
- test: test-executor
containerRuntimeExecutor: kubelet
profile: minimal
- test: test-executor
containerRuntimeExecutor: pns
profile: minimal
- test: test-functional
containerRuntimeExecutor: emissary
profile: minimal
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
Expand All @@ -86,32 +97,28 @@ jobs:
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: mkdir -p /tmp/log/argo-e2e
- name: Install and start K3S
timeout-minutes: 3
run: |
curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.18.17+k3s1 INSTALL_K3S_CHANNEL=stable INSTALL_K3S_EXEC=--docker K3S_KUBECONFIG_MODE=644 sh -
until kubectl --kubeconfig=/etc/rancher/k3s/k3s.yaml cluster-info ; do sleep 10s ; done
cp /etc/rancher/k3s/k3s.yaml /home/runner/.kubeconfig
echo "- name: fake_token_user" >> $KUBECONFIG
echo " user:" >> $KUBECONFIG
echo " token: xxxxxx" >> $KUBECONFIG
until kubectl cluster-info ; do sleep 10s ; done
- name: Set-up /etc/hosts
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=minimal
if [ "${{matrix.test}}" = test-cli ] || [ "${{matrix.test}}" = test-api ]; then
PROFILE=mysql
fi
mkdir -p /tmp/log/argo-e2e
KUBECONFIG=~/.kube/config make install PROFILE=$PROFILE E2E_EXECUTOR=${{matrix.containerRuntimeExecutor}} AUTH_MODE=client STATIC_FILES=false DEV_IMAGE=true LOG_LEVEL=info
KUBECONFIG=~/.kube/config make start PROFILE=$PROFILE E2E_EXECUTOR=${{matrix.containerRuntimeExecutor}} AUTH_MODE=client STATIC_FILES=false DEV_IMAGE=true LOG_LEVEL=info 2>&1 > /tmp/log/argo-e2e/argo.log &
- run: make wait
- run: make install PROFILE=${{matrix.profile}} E2E_EXECUTOR=${{matrix.containerRuntimeExecutor}} AUTH_MODE=client STATIC_FILES=false DEV_IMAGE=true LOG_LEVEL=info
- run: make start PROFILE=${{matrix.profile}} E2E_EXECUTOR=${{matrix.containerRuntimeExecutor}} AUTH_MODE=client STATIC_FILES=false DEV_IMAGE=true LOG_LEVEL=info 2>&1 > /tmp/log/argo-e2e/argo.log &
- run: make executor-image wait STATIC_FILES=false DEV_IMAGE=true
timeout-minutes: 3
- run: make ${{matrix.test}} E2E_TIMEOUT=1m
- name: Upload logs
if: ${{ failure() }}
Expand Down

0 comments on commit 54f4c26

Please sign in to comment.