This repository has been archived by the owner on Oct 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 521
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add on-demand cluster config GitHub Action (#4632)
- Loading branch information
1 parent
cd6e350
commit 4f30d20
Showing
1 changed file
with
78 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: Test Cluster Config | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
cluster_config: | ||
description: 'Which cluster config type? (options are: "gpu")' | ||
required: true | ||
from_branch: | ||
description: 'Which branch to source release branch from? (default: master)' | ||
required: false | ||
default: 'master' | ||
jobs: | ||
create-release-branch: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: validate version | ||
run: echo "${{github.event.inputs.cluster_config}}" | grep -E '^gpu$' | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{github.event.inputs.from_branch}} | ||
- name: Setup SSH Keys and known_hosts | ||
env: | ||
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | ||
run: | | ||
ssh-agent -a $SSH_AUTH_SOCK > /dev/null | ||
- name: install go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '^1.16' | ||
- name: Install helm | ||
run: | | ||
curl https://baltocdn.com/helm/signing.asc | sudo apt-key add - | ||
sudo apt-get install apt-transport-https --yes | ||
echo "deb https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list | ||
sudo apt-get update | ||
sudo apt-get install helm | ||
- name: Install k | ||
run: | | ||
sudo curl -o /usr/local/bin/k https://raw.githubusercontent.com/jakepearson/k/master/k | ||
sudo chmod +x /usr/local/bin/k | ||
- name: Build aks-engine binary | ||
run: make build-binary | ||
- name: Validate gpu + docker scenario | ||
if: ${{ github.event.inputs.cluster_config == 'gpu' }} | ||
env: | ||
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | ||
ORCHESTRATOR_RELEASE: "1.22" | ||
CLUSTER_DEFINITION: "examples/kubernetes-gpu/kubernetes.json" | ||
GINKGO_FOCUS: "should be able to run a nvidia-gpu job" | ||
SUBSCRIPTION_ID: ${{ secrets.TEST_AZURE_SUB_ID }} | ||
CLIENT_ID: ${{ secrets.TEST_AZURE_SP_ID }} | ||
CLIENT_SECRET: ${{ secrets.TEST_AZURE_SP_PW }} | ||
LOCATION: "westus2" | ||
TENANT_ID: ${{ secrets.TEST_AZURE_TENANT_ID }} | ||
CLEANUP_ON_EXIT: true | ||
CLEANUP_IF_FAIL: true | ||
CONTAINER_RUNTIME: "docker" | ||
SKIP_LOGS_COLLECTION: true | ||
AZURE_CORE_ONLY_SHOW_ERRORS: True | ||
run: make test-kubernetes | ||
- name: Validate gpu + containerd scenario | ||
if: ${{ github.event.inputs.cluster_config == 'gpu' }} | ||
env: | ||
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | ||
ORCHESTRATOR_RELEASE: "1.22" | ||
CLUSTER_DEFINITION: "examples/kubernetes-gpu/kubernetes.json" | ||
GINKGO_FOCUS: "should be able to run a nvidia-gpu job" | ||
SUBSCRIPTION_ID: ${{ secrets.TEST_AZURE_SUB_ID }} | ||
CLIENT_ID: ${{ secrets.TEST_AZURE_SP_ID }} | ||
CLIENT_SECRET: ${{ secrets.TEST_AZURE_SP_PW }} | ||
LOCATION: "westus2" | ||
TENANT_ID: ${{ secrets.TEST_AZURE_TENANT_ID }} | ||
CLEANUP_ON_EXIT: true | ||
CLEANUP_IF_FAIL: true | ||
CONTAINER_RUNTIME: "containerd" | ||
SKIP_LOGS_COLLECTION: true | ||
AZURE_CORE_ONLY_SHOW_ERRORS: True | ||
run: make test-kubernetes |