This repository has been archived by the owner on Jul 15, 2024. It is now read-only.
Nightly test of ApplicationSet 'master' on latest stable ArgoCD releases #597
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
name: Nightly test of ApplicationSet 'master' on latest stable ArgoCD releases | |
# This is useful for detecting regressions of ApplicationSet master branch against released Argo CD releases. | |
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: 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() }} |