Skip to content

Commit

Permalink
Reuse existing App Registrations
Browse files Browse the repository at this point in the history
  • Loading branch information
saimachi committed Jun 26, 2024
1 parent 9a979c4 commit 1783b7b
Showing 1 changed file with 13 additions and 33 deletions.
46 changes: 13 additions & 33 deletions .github/workflows/load-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -251,20 +251,6 @@ jobs:
--tenant-id "$($info.tenantId)"
shell: pwsh

- name: Provision App Registrations
id: provision-app-registrations
run: |
Write-Host "Provision App Registrations"
Push-Location ./tests/scripts
./Create-FllmEntraIdApps.ps1 `
-authAppName FoundationaLLM-Authorization-E2E-${{ needs.generate_matrix.outputs.unique_id }} `
-coreAppName FoundationaLLM-Core-E2E-${{ needs.generate_matrix.outputs.unique_id }} `
-coreClientAppName FoundationaLLM-Core-E2E-Client-${{ needs.generate_matrix.outputs.unique_id }} `
-mgmtAppName FoundationaLLM-Management-E2E-${{ needs.generate_matrix.outputs.unique_id }} `
-mgmtClientAppName FoundationaLLM-Management-E2E-Client-${{ needs.generate_matrix.outputs.unique_id }}
Pop-Location
shell: pwsh

- name: Provision Admin Group
id: provision-admin-group
run: |
Expand Down Expand Up @@ -354,11 +340,11 @@ jobs:
-tenantId $($info.tenantId) `
-principalType ServicePrincipal `
-instanceId 6fa496ce-d5c0-4e02-9223-06a98c9c0176 `
-fllmApiName FoundationaLLM-Core-E2E-${{ needs.generate_matrix.outputs.unique_id }} `
-fllmClientName FoundationaLLM-Core-E2E-Client-${{ needs.generate_matrix.outputs.unique_id }} `
-fllmMgmtApiName FoundationaLLM-Management-E2E-${{ needs.generate_matrix.outputs.unique_id }} `
-fllmMgmtClientName FoundationaLLM-Management-E2E-Client-${{ needs.generate_matrix.outputs.unique_id }} `
-fllmAuthApiName FoundationaLLM-Authorization-E2E-${{ needs.generate_matrix.outputs.unique_id }} `
-fllmApiName FoundationaLLM-Core-API `
-fllmClientName FoundationaLLM-Core-Portal `
-fllmMgmtApiName FoundationaLLM-Management-API `
-fllmMgmtClientName FoundationaLLM-Management-Portal `
-fllmAuthApiName FoundationaLLM-Authorization-API `
-fllmAdminGroupName FLLM-E2E-Admins-${{ needs.generate_matrix.outputs.unique_id }}
Pop-Location
shell: pwsh
Expand Down Expand Up @@ -422,8 +408,8 @@ jobs:
Write-Host "Update App Registration OAuth Callbacks"
Push-Location ./deploy/quick-start
pwsh -File ../../tests/scripts/Update-OAuthCallbackUris.ps1 `
-fllmChatUiName FoundationaLLM-Core-E2E-Client-${{ needs.generate_matrix.outputs.unique_id }} `
-fllmMgmtUiName FoundationaLLM-Management-E2E-Client-${{ needs.generate_matrix.outputs.unique_id }}
-fllmChatUiName FoundationaLLM-Core-Portal `
-fllmMgmtUiName FoundationaLLM-Management-Portal
Pop-Location
shell: pwsh

Expand Down Expand Up @@ -682,7 +668,7 @@ jobs:
echo "AZURE_APP_CONFIG_NAME=$($configurationParameters['AZURE_APP_CONFIG_NAME'])" >> $env:GITHUB_ENV
echo "AZURE_ENV_NAME=$($configurationParameters['AZURE_ENV_NAME'])" >> $env:GITHUB_ENV
$token = (az account get-access-token --scope "api://FoundationaLLM-Core-E2E-${{ needs.generate_matrix.outputs.unique_id }}/.default" --query accessToken | ConvertFrom-Json)
$token = (az account get-access-token --scope "api://FoundationaLLM-Core/.default" --query accessToken | ConvertFrom-Json)
$kvUrl = (az keyvault secret set --vault-name "fllme2emkeyvault7f393d64" --name "bearer-token-${{ needs.generate_matrix.outputs.unique_id }}" --value $token --query '{id: id}' | ConvertFrom-Json).id
# Replace Placeholders
Expand Down Expand Up @@ -821,21 +807,15 @@ jobs:
-principalType ServicePrincipal `
-instanceId 6fa496ce-d5c0-4e02-9223-06a98c9c0176
Write-Host "Removing App Registration OAuth Callbacks"
pwsh -File ../../tests/scripts/Remove-OAuthCallbackUris.ps1 `
-fllmChatUiName FoundationaLLM-Core-Portal `
-fllmMgmtUiName FoundationaLLM-Management-Portal
azd env refresh --no-prompt
azd down --force --purge --no-prompt
Pop-Location
Write-Host "Remove Admin Group"
az ad group delete --group FLLM-E2E-Admins-${{ needs.generate_matrix.outputs.unique_id }} --output json
Write-Host "Tear down App Registrations"
Push-Location ./tests/scripts
./Remove-EntraIdApps.ps1 `
-authAppName FoundationaLLM-Authorization-E2E-${{ needs.generate_matrix.outputs.unique_id }} `
-coreAppName FoundationaLLM-Core-E2E-${{ needs.generate_matrix.outputs.unique_id }} `
-coreClientAppName FoundationaLLM-Core-E2E-Client-${{ needs.generate_matrix.outputs.unique_id }} `
-mgmtAppName FoundationaLLM-Management-E2E-${{ needs.generate_matrix.outputs.unique_id }} `
-mgmtClientAppName FoundationaLLM-Management-E2E-Client-${{ needs.generate_matrix.outputs.unique_id }} `
-interactiveMode $false
Pop-Location
shell: pwsh

0 comments on commit 1783b7b

Please sign in to comment.