This repository has been archived by the owner on Jul 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 278
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add GitHub action to run E2E tests against nightly Argo CD, w/…
… ApplicationSet master branch (#470) Signed-off-by: Jonathan West <jonwest@redhat.com>
- Loading branch information
Showing
7 changed files
with
440 additions
and
71 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,107 @@ | ||
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] | ||
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: Login to GitHub | ||
run: | | ||
echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token | ||
- 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.16.4' | ||
|
||
- 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() }} |
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,83 @@ | ||
name: Nightly test of ApplicationSet 'master' branch against latest Argo CD 'master' branch | ||
# This is useful for catching recent regressions between master branches of Argo CD and ApplicationSet. | ||
|
||
on: | ||
schedule: | ||
- cron: '5 2 * * *' | ||
|
||
push: | ||
branches: | ||
- 'cron-test-argocd' | ||
|
||
|
||
jobs: | ||
|
||
test-e2e: | ||
name: Run end-to-end tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
k3s-version: [v1.20.2] | ||
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 | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }} | ||
|
||
steps: | ||
|
||
- name: Checkout latest Argo CD code | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: argoproj/argo-cd | ||
ref: master | ||
path: argo-cd | ||
|
||
- name: Setup Golang | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '1.16.4' | ||
|
||
- 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 | ||
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: | | ||
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() }} |
Oops, something went wrong.