-
Notifications
You must be signed in to change notification settings - Fork 22
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
16 changed files
with
1,012 additions
and
45 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,15 @@ | ||
name: e2e-latest-rancher | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
schedule: | ||
- cron: 0 22 * * * | ||
permissions: read-all | ||
jobs: | ||
e2e-tests: | ||
uses: ./.github/workflows/e2e.yaml | ||
secrets: | ||
GKE_CREDENTIALS: ${{ secrets.GKE_CREDENTIALS }} | ||
GKE_PROJECT_ID: ${{ secrets.GKE_PROJECT_ID }} |
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,82 @@ | ||
name: E2E tests | ||
on: | ||
workflow_call: | ||
secrets: | ||
GKE_CREDENTIALS: | ||
description: "GKE credentials" | ||
required: true | ||
GKE_PROJECT_ID: | ||
description: "GKE project ID" | ||
required: true | ||
env: | ||
GKE_CREDENTIALS: ${{ secrets.GKE_CREDENTIALS }} | ||
GKE_PROJECT_ID: ${{ secrets.GKE_PROJECT_ID }} | ||
|
||
jobs: | ||
e2e-tests: | ||
env: | ||
REPO: ttl.sh/gke-operator-ci | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Export tag | ||
id: export_tag | ||
run: | | ||
TAG="v0.0.0" | ||
COMMITDATE=`date -d @$(git log -n1 --format="%at") "+%FT%TZ"` | ||
echo "operator_tag=$TAG" >> $GITHUB_OUTPUT | ||
echo "commit_date=$COMMITDATE" >> $GITHUB_OUTPUT | ||
- name: Docker meta | ||
id: meta | ||
uses: docker/[email protected] | ||
with: | ||
images: | | ||
${{ env.REPO }} | ||
tags: | | ||
type=sha,format=short,prefix=${{ steps.export_tag.outputs.operator_tag }}- | ||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/[email protected] | ||
- name: Build and push image | ||
uses: docker/[email protected] | ||
with: | ||
context: . | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
push: true | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
target: gke-operator | ||
file: test/e2e/Dockerfile.e2e | ||
build-args: | | ||
TAG=${{ steps.export_tag.outputs.operator_tag }} | ||
COMMITDATE=${{ steps.export_tag.outputs.commit_date }} | ||
COMMIT=${{ github.sha }} | ||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.21.x | ||
- uses: engineerd/[email protected] | ||
with: | ||
version: "v0.16.0" | ||
skipClusterCreation: "true" | ||
- name: Create kind cluster | ||
run: make setup-kind | ||
- name: Set the value | ||
run: | | ||
GKE_PROJECT_ID="${{ env.GKE_PROJECT_ID }}" | ||
echo "GKE_PROJECT_ID=${GKE_PROJECT_ID}" >> $GITHUB_ENV | ||
- name: E2E tests | ||
env: | ||
GKE_CREDENTIALS: "${{ secrets.GKE_CREDENTIALS }}" | ||
run: make e2e-tests | ||
- name: Archive artifacts | ||
if: always() | ||
uses: actions/[email protected] | ||
with: | ||
name: ci-artifacts | ||
path: _artifacts | ||
if-no-files-found: ignore |
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
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
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
Oops, something went wrong.