Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

Nightly test of latest stable releases of ApplicationSet against latest stable releases of ArgoCD #588

Nightly test of latest stable releases of ApplicationSet against latest stable releases of ArgoCD

Nightly test of latest stable releases of ApplicationSet against latest stable releases of ArgoCD #588

name: Nightly test of latest stable releases of ApplicationSet against latest stable releases of ArgoCD
# This is useful for catching regressions of released ApplicationSet versions, against release Argo CD versions.
on:
schedule:
- cron: '5 2 * * *'
jobs:
test-e2e:
name: "Run E2E tests - K8s/Argo CD:"
runs-on: ubuntu-latest
strategy:
matrix:
k3s-version: [v1.20.2]
argo-release: [Latest, v2.1, v2.2, v2.3]
env:
GOPATH: /home/runner/go
ARGOCD_FAKE_IN_CLUSTER: 'true'
ARGOCD_SSH_DATA_PATH: '/tmp/argo-e2e/app/config/ssh'
ARGOCD_TLS_DATA_PATH: '/tmp/argo-e2e/app/config/tls'
ARGOCD_E2E_SSH_KNOWN_HOSTS: '../fixture/certs/ssh_known_hosts'
ARGOCD_E2E_K3S: 'true'
ARGOCD_IN_CI: 'true'
ARGOCD_E2E_APISERVER_PORT: '8088'
ARGOCD_SERVER: '127.0.0.1:8088'
INSTALL_K3S_VERSION: ${{ matrix.k3s-version }}+k3s1
RELEASE_LIST_SEARCH_STRING: ${{ matrix.argo-release }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
steps:
- name: Call GitHub CLI to find latest stable Argo CD release
id: get-argocd-stable
run: |
LATEST_RELEASE=`gh release list --repo argoproj/argo-cd | grep "$RELEASE_LIST_SEARCH_STRING" | head -n 1 | cut -f 1`
echo Latest release for $RELEASE_LIST_SEARCH_STRING is $LATEST_RELEASE
echo "::set-output name=latestRelease::$LATEST_RELEASE"
- name: Call GitHub CLI to find latest stable ApplicationSet release
id: get-appset-stable
run: |
LATEST_RELEASE=`gh release list --repo argoproj-labs/applicationset | grep "Latest" | cut -f 1`
echo Latest release for ApplicationSet is $LATEST_RELEASE
echo "::set-output name=latestRelease::$LATEST_RELEASE"
- name: Checkout latest Argo CD code
uses: actions/checkout@v2
with:
repository: argoproj/argo-cd
ref: ${{steps.get-argocd-stable.outputs.latestRelease}}
path: argo-cd
- name: Setup Golang
uses: actions/setup-go@v2
with:
go-version: '1.17.6'
- name: Restore go build cache
uses: actions/cache@v1
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-go-build-v1-${{ github.run_id }}
- name: Checkout latest applicationset code from latest stable release
uses: actions/checkout@v2
with:
path: applicationset
ref: ${{steps.get-appset-stable.outputs.latestRelease}}
- name: Checkout latest applicationset code from master
uses: actions/checkout@v2
with:
path: applicationset
- name: Checkout latest applicationset code from latest stable release
uses: actions/checkout@v2
with:
path: applicationset
ref: ${{steps.get-appset-stable.outputs.latestRelease}}
- name: Checkout latest applicationset code from master
uses: actions/checkout@v2
with:
path: applicationset-master
- name: Add test runner scripts from AppSet master to release branch
run: |
mkdir -p "$GITHUB_WORKSPACE/applicationset/hack"
cp "$GITHUB_WORKSPACE"/applicationset-master/hack/ci-e2e-*.sh "$GITHUB_WORKSPACE/applicationset/hack"
ls -l "$GITHUB_WORKSPACE/applicationset/hack"
- name: Run E2E test setup
timeout-minutes: 20
run: |
cd "$GITHUB_WORKSPACE/applicationset"
"hack/ci-e2e-setup.sh"
- name: Run E2E tests
timeout-minutes: 20
run: |
echo Running tests against Argo CD ${{steps.get-argocd-stable.outputs.latestRelease}} and ApplicationSet ${{steps.get-appset-stable.outputs.latestRelease}}
cd "$GITHUB_WORKSPACE/applicationset"
"hack/ci-e2e-run.sh"
- name: Upload e2e-server logs
uses: actions/upload-artifact@v2
with:
name: appset-e2e-server-k8s${{ matrix.k3s-version }}.log
path: /tmp/appset-e2e-server.log
if: ${{ failure() }}
- name: Upload other Argo CD server log
uses: actions/upload-artifact@v2
with:
name: argocd-e2e-server-k8s${{ matrix.k3s-version }}.log
path: /tmp/e2e-server.log
if: ${{ failure() }}