-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move from drone to GHA for kdm 2.7 (#1429)
- Loading branch information
1 parent
8adaf67
commit 2ab3b4f
Showing
11 changed files
with
239 additions
and
1,221 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 @@ | ||
_extends: .github-private |
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,28 @@ | ||
name: Fossa Scan | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'dev-v*' | ||
- 'release-v*' | ||
|
||
jobs: | ||
fossa: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
id-token: write | ||
timeout-minutes: 20 | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
- name: Read FOSSA token | ||
uses: rancher-eio/read-vault-secrets@main | ||
with: | ||
secrets: | | ||
secret/data/github/org/rancher/fossa/push token | FOSSA_API_KEY_PUSH_ONLY | ||
- name: FOSSA scan | ||
uses: fossas/fossa-action@main | ||
with: | ||
api-key: ${{ env.FOSSA_API_KEY_PUSH_ONLY }} | ||
run-tests: false |
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,78 @@ | ||
name: Provisioning tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'dev-v*' | ||
- 'release-v*' | ||
pull_request: | ||
branches: | ||
- 'dev-v*' | ||
- 'release-v*' | ||
|
||
jobs: | ||
provisioning-test: | ||
permissions: | ||
contents: read | ||
runs-on: runs-on,runner=4cpu-linux-x64,image=legacy-cgroups-for-x64,run-id=${{ github.run_id }} | ||
container: | ||
image: rancher/dapper:v0.6.0 | ||
options: --privileged | ||
timeout-minutes: 90 | ||
strategy: | ||
matrix: | ||
dist: [rke2, k3s] | ||
k8s-minor: [23, 24, 25, 26, 27] | ||
fail-fast: false | ||
steps: | ||
- name: Force Install GIT latest | ||
run: | | ||
apk add git --update-cache | ||
git --version | ||
git config --global --add safe.directory "$GITHUB_WORKSPACE" | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: "0" | ||
- name: Provisioning test | ||
run: | | ||
dapper provisioning-tests | ||
env: | ||
V2PROV_TEST_DIST: ${{ matrix.dist }} | ||
V2PROV_TEST_RUN_REGEX: "^Test_Provisioning_.*$" | ||
KDM_TEST_K8S_MINOR: ${{ matrix.k8s-minor }} | ||
PREV_COMMIT_PR_SHA: ${{ github.event.pull_request.base.sha }} | ||
PREV_COMMIT_PUSH_SHA: ${{ github.event.before }} | ||
|
||
provisioning-operations-test: | ||
permissions: | ||
contents: read | ||
runs-on: runs-on,runner=4cpu-linux-x64,image=legacy-cgroups-for-x64,run-id=${{ github.run_id }} | ||
container: | ||
image: rancher/dapper:v0.6.0 | ||
options: --privileged | ||
timeout-minutes: 90 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
dist: [rke2, k3s] | ||
k8s-minor: [23, 24, 25, 26, 27] | ||
steps: | ||
- name: Force Install GIT latest | ||
run: | | ||
apk add git --update-cache | ||
git --version | ||
git config --global --add safe.directory "$GITHUB_WORKSPACE" | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: "0" | ||
- name: Provisioning Operations tests | ||
run: | | ||
dapper provisioning-tests | ||
env: | ||
V2PROV_TEST_DIST: ${{ matrix.dist }} | ||
V2PROV_TEST_RUN_REGEX: "^Test_Operation_SetA_.*$" | ||
KDM_TEST_K8S_MINOR: ${{ matrix.k8s-minor }} | ||
PREV_COMMIT_PR_SHA: ${{ github.event.pull_request.base.sha }} | ||
PREV_COMMIT_PUSH_SHA: ${{ github.event.before }} |
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,105 @@ | ||
name: Main workflow | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'dev-v*' | ||
- 'release-v*' | ||
pull_request: | ||
branches: | ||
- 'dev-v*' | ||
- 'release-v*' | ||
|
||
jobs: | ||
validate: | ||
permissions: | ||
contents: read | ||
id-token: write | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
container: | ||
image: rancher/dapper:v0.6.0 | ||
steps: | ||
- name: Force Install GIT latest | ||
run: | | ||
apk add git --update-cache | ||
git --version | ||
git config --global --add safe.directory "$GITHUB_WORKSPACE" | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Validate | ||
run: dapper ci | ||
|
||
mirror-images: | ||
permissions: | ||
contents: read | ||
id-token: write | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
needs: validate | ||
container: | ||
image: rancher/dapper:v0.6.0 | ||
if: github.event_name == 'push' && startsWith(github.ref_name, 'release-v') | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Retrieve Registy secrets from vault | ||
uses: rancher-eio/read-vault-secrets@main | ||
with: | ||
secrets: | | ||
secret/data/github/repo/${{ github.repository }}/registry-endpoint/credentials token | REGISTRY_ENDPOINT ; | ||
secret/data/github/repo/${{ github.repository }}/registry-username/credentials token | REGISTRY_USERNAME ; | ||
secret/data/github/repo/${{ github.repository }}/registry-password/credentials token | REGISTRY_PASSWORD | ||
- name: Validate | ||
run: dapper mirror-images | ||
|
||
upload: | ||
permissions: | ||
contents: read | ||
id-token: write | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
needs: validate | ||
if: github.event_name == 'push' | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Retrieve Google auth from vault | ||
uses: rancher-eio/read-vault-secrets@main | ||
with: | ||
secrets: | | ||
secret/data/github/repo/${{ github.repository }}/google-auth/rancher/credentials token | GOOGLE_AUTH ; | ||
- name: Authenticate with Google Cloud | ||
uses: 'google-github-actions/auth@v2' | ||
with: | ||
credentials_json: '${{ env.GOOGLE_AUTH }}' | ||
- name: Upload to Google Cloud Storage | ||
uses: google-github-actions/upload-cloud-storage@v2 | ||
with: | ||
path: data/ | ||
destination: releases.rancher.com/kontainer-driver-metadata/${{ github.ref_name }} | ||
parent: false | ||
predefinedAcl: publicRead | ||
headers: |- | ||
cache-control: public,no-cache,proxy-revalidate | ||
dispatch: | ||
permissions: | ||
contents: read | ||
id-token: write | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
needs: upload | ||
if: github.event_name == 'push' && (github.ref_name == 'release-v2.7' || github.ref_name == 'dev-v2.7') | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Retrieve token from vault | ||
uses: rancher-eio/read-vault-secrets@main | ||
with: | ||
secrets: | | ||
secret/data/github/repo/${{ github.repository }}/github-token/credentials token | PAT_TOKEN | ||
- name: Run dispatch | ||
run: | | ||
echo ${{ env.PAT_TOKEN }} | gh auth login --with-token | ||
gh workflow run "Go Generate" --repo rancher/rke --ref release/v1.4 -F source_author=${{ github.actor }} |
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 was deleted.
Oops, something went wrong.
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