-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get kubernetes version for all cloud providers + pytest refactor (#927)
* Add k8s version checker for AWS * Grab latest azure k8s version available by default * Update initialize with k8s versioning * Add boto3 to setup.py * Create _set_kubernetes_version function for init * Minor update to tests * Standardize k8s version check for DO and GCP * Update yaml call based on deprecation warning * Add setup_fixture to conftest.py * Use copy of config dicts * Standardize kubernetes_versions functions for all providers * Update tests to use new setup_fixture * fix failing test * Update docs to reflect changes * Update usage.md based on linter * Update usage.md based on linter * Split test workflow into two seperate workflows * Update test-provider.yaml * Test secrets * Add secrets, remove kubernetes_version * Add gcloud to test-provider workflow * Add gcloud to test-provider workflow * Add gcloud to test-provider workflow * Add azure to test-provider * Add azure env vars to test-provider * Add azure cli login to test-provider * Remove conditional setup * Update test-provider.yaml * Update test-provider.yaml * Update azure env vars * Fix issue from merge * Add azure env vars * Add azure env vars, part 2 * Include gcloud and az cli conditionally * Update project-name in tests/conftest based on PR 761 * Minor docs change * Add QHUB_K8S_VERSION and docs * doc lint only modified files * Fix vale complaints * Fix vale complaints * Fix vale complaints * Ignore myqhubsite.com md lint * Undo fix to login.md * Update docs/source/installation/usage.md Co-authored-by: Vinicius D. Cerutti <51954708+viniciusdc@users.noreply.github.com> * Updates based on code review * Update digital_ocean.py Co-authored-by: Vinicius D. Cerutti <51954708+viniciusdc@users.noreply.github.com>
- Loading branch information
1 parent
066774e
commit b990789
Showing
20 changed files
with
472 additions
and
241 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 |
---|---|---|
|
@@ -14,6 +14,9 @@ | |
}, | ||
{ | ||
"pattern": "127.0.0.1:8000" | ||
}, | ||
{ | ||
"pattern": "myqhubsite.com" | ||
} | ||
] | ||
} |
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,73 @@ | ||
name: "Test QHub Provider" | ||
|
||
on: | ||
pull_request: # Workflow only runs for PR against main anyway | ||
push: | ||
branches: | ||
- '**' | ||
tags: | ||
- 'v*' | ||
paths-ignore: | ||
- "docs/**" | ||
- "*.md" | ||
|
||
env: | ||
DIGITALOCEAN_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }} | ||
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }} | ||
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }} | ||
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }} | ||
|
||
jobs: | ||
test-render-providers: | ||
name: 'Test QHub Provider' | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
provider: | ||
- aws | ||
- azure | ||
- do | ||
- gcp | ||
- local | ||
steps: | ||
- name: 'Checkout Infrastructure' | ||
uses: actions/checkout@main | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.8 | ||
- name: Set up Cloud SDK | ||
uses: google-github-actions/setup-gcloud@master | ||
if: ${{ matrix.provider == 'gcp' }} | ||
with: | ||
project_id: ${{ secrets.GCP_PROJECT_ID }} | ||
service_account_key: ${{ secrets.GOOGLE_CREDENTIALS }} | ||
- name: Use gcloud CLI | ||
if: ${{ matrix.provider == 'gcp' }} | ||
run: gcloud info | ||
- name: Login to Azure | ||
uses: azure/login@v1 | ||
if: ${{ matrix.provider == 'azure' }} | ||
with: | ||
creds: ${{ secrets.AZURE_CREDENTIALS }} | ||
- name: Use az CLI | ||
if: ${{ matrix.provider == 'azure' }} | ||
run: az version | ||
- name: Install QHub | ||
run: | | ||
pip install .[dev] | ||
- name: QHub Initialize | ||
run: | | ||
qhub init "${{ matrix.provider }}" --project "test-${{ matrix.provider }}" --domain "${{ matrix.provider }}.qhub.dev" --auth-provider github --disable-prompt | ||
- name: QHub Render | ||
run: | | ||
qhub render -c "qhub-config.yaml" -o "qhub-${{ matrix.provider }}-deployment" | ||
cp "qhub-config.yaml" "qhub-${{ matrix.provider }}-deployment/qhub-config.yaml" | ||
- name: QHub Render Artifact | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: "qhub-${{ matrix.provider }}-artifact" | ||
path: "qhub-${{ matrix.provider }}-deployment" |
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.