Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: add azure integration #2061

Merged
merged 29 commits into from
May 30, 2024
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
ca553cc
CI: add azure integration
fangchenli Oct 11, 2023
f9d98a1
debug
fangchenli Oct 11, 2023
b36b963
debug
fangchenli Oct 11, 2023
44f34bc
add login back
fangchenli Oct 11, 2023
894ff9d
Merge remote-tracking branch 'origin/develop' into azure-integration
fangchenli Oct 15, 2023
64cf433
use_oidc
fangchenli Oct 15, 2023
0cd51e6
Merge branch 'develop' into azure-integration
dcmcand Mar 13, 2024
d52a71c
Merge branch 'develop' into azure-integration
viniciusdc Apr 17, 2024
e190309
use latest azure login action
Adam-D-Lewis Apr 17, 2024
9a9cddb
add tmate
Adam-D-Lewis Apr 17, 2024
2eb3d67
add tmate
Adam-D-Lewis Apr 17, 2024
51f03ee
add tmate
Adam-D-Lewis Apr 17, 2024
7e142f0
remove tmate
Adam-D-Lewis Apr 17, 2024
64fd3b8
debug step
Adam-D-Lewis Apr 22, 2024
0b08c81
Merge branch 'develop' into azure-integration
Adam-D-Lewis Apr 22, 2024
fd3424f
try this
Adam-D-Lewis Apr 22, 2024
48d9b4f
try this
Adam-D-Lewis Apr 22, 2024
9d7c37e
fix missing optional tags
Adam-D-Lewis Apr 22, 2024
e62b45b
fix missing optional tags
Adam-D-Lewis Apr 22, 2024
ac9f140
Merge branch 'develop' into azure-integration
viniciusdc Apr 26, 2024
e5fc746
try this
Adam-D-Lewis May 30, 2024
4a3e3ea
remove azure login github action and try forcing it to use OIDC
Adam-D-Lewis May 30, 2024
5834b8c
update
Adam-D-Lewis May 30, 2024
25e0979
remove extra env vars
Adam-D-Lewis May 30, 2024
043351c
Merge branch 'develop' into azure-integration
Adam-D-Lewis May 30, 2024
cc307b7
revert this change
Adam-D-Lewis May 30, 2024
aa3061f
remove output adding by accident
Adam-D-Lewis May 30, 2024
587cdfb
delete extra rg
Adam-D-Lewis May 30, 2024
938e9b7
Revert "delete extra rg"
Adam-D-Lewis May 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 94 additions & 0 deletions .github/workflows/test_azure_integration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: test-azure-integration

on:
schedule:
- cron: "0 0 * * MON"
pull_request:
branches:
- develop
workflow_dispatch:
inputs:
branch:
description: 'Nebari branch to deploy, test, destroy'
required: true
default: develop
type: string
image-tag:
description: 'Nebari image tag created by the nebari-docker-images repo'
required: true
default: main
type: string
tf-log-level:
description: 'Change Terraform log levels'
required: false
default: info
type: choice
options:
- info
- warn
- debug
- trace
- error

env:
NEBARI_GH_BRANCH: ${{ github.event.inputs.branch || 'develop' }}
NEBARI_IMAGE_TAG: ${{ github.event.inputs.image-tag || 'main' }}
TF_LOG: ${{ github.event.inputs.tf-log-level || 'info' }}

jobs:
test-azure-integration:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ env.NEBARI_GH_BRANCH }}
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11

- name: Install Nebari
run: |
pip install .[dev]
conda install --quiet --yes conda-build
playwright install

- name: Retrieve secret from Vault
uses: hashicorp/[email protected]
with:
method: jwt
url: "https://quansight-vault-public-vault-b2379fa7.d415e30e.z1.hashicorp.cloud:8200"
namespace: "admin/quansight"
role: "repository-nebari-dev-nebari-role"
secrets: |
kv/data/repository/nebari-dev/nebari/azure/nebari-dev-ci/github-nebari-dev-repo-ci client_id | ARM_CLIENT_ID;
kv/data/repository/nebari-dev/nebari/azure/nebari-dev-ci/github-nebari-dev-repo-ci tenant_id | ARM_TENANT_ID;
kv/data/repository/nebari-dev/nebari/azure/nebari-dev-ci/github-nebari-dev-repo-ci subscription_id | ARM_SUBSCRIPTION_ID;
kv/data/repository/nebari-dev/nebari/cloudflare/[email protected]/nebari-dev-ci token | CLOUDFLARE_TOKEN;

- name: 'Azure login'
uses: azure/login@v2
with:
client-id: ${{ env.ARM_CLIENT_ID }}
tenant-id: ${{ env.ARM_TENANT_ID }}
subscription-id: ${{ env.ARM_SUBSCRIPTION_ID }}

- name: Integration Tests
run: |
pytest --version
pytest tests/tests_integration/ -vvv -s --cloud azure
env:
NEBARI_SECRET__default_images__jupyterhub: "quay.io/nebari/nebari-jupyterhub:${{ env.NEBARI_IMAGE_TAG }}"
NEBARI_SECRET__default_images__jupyterlab: "quay.io/nebari/nebari-jupyterlab:${{ env.NEBARI_IMAGE_TAG }}"
NEBARI_SECRET__default_images__dask_worker: "quay.io/nebari/nebari-dask-worker:${{ env.NEBARI_IMAGE_TAG }}"
ARM_CLIENT_ID: ${{ env.ARM_CLIENT_ID }}
ARM_TENANT_ID: ${{ env.ARM_TENANT_ID }}
ARM_SUBSCRIPTION_ID: ${{ env.ARM_SUBSCRIPTION_ID }}
ARM_USE_OIDC: "true"
CLOUDFLARE_TOKEN: ${{ env.CLOUDFLARE_TOKEN }}
Loading