Skip to content

Commit

Permalink
Merge pull request #16 from pennsignals/march-updates
Browse files Browse the repository at this point in the history
March updates
  • Loading branch information
jsimp78 authored Mar 26, 2024
2 parents bb6a79c + c80d09c commit 4de149e
Show file tree
Hide file tree
Showing 86 changed files with 2,041 additions and 3,547 deletions.
18 changes: 12 additions & 6 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
# Add 'webapp' label to any change within the 'webapp' directory
webapp:
- webapp/**/*
- changed-files:
- any-glob-to-any-file: ["webapp/**"]

# Add 'webapi' label to any change within the 'webapi' directory
webapi:
- webapi/**/*
- changed-files:
- any-glob-to-any-file: ["webapi/**"]

# Add 'dependencies' label to any change of the 'webapp/yarn.lock' file
dependencies:
- webapp/yarn.lock
- changed-files:
- any-glob-to-any-file: ["webapp/yarn.lock"]

# Add 'deployment' label to any change within the 'deploy' directory
deployment:
- scripts/deploy/**/*
- changed-files:
- any-glob-to-any-file: ["scripts/deploy/**"]

# Add 'documentation' label to any change of '.md' files
documentation:
- "**/*.md"
- changed-files:
- any-glob-to-any-file: ["**/*.md"]

# Add 'github actions' label to any change within the '.github/workflows' directory
"github actions":
- .github/workflows/**/*
- changed-files:
- any-glob-to-any-file: [".github/workflows/**"]
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -47,7 +47,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Expand All @@ -60,6 +60,6 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
2 changes: 1 addition & 1 deletion .github/workflows/copilot-build-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
scripts\deploy\package-webapi.ps1 -Configuration Release -DotnetFramework net6.0 -TargetRuntime win-x64 -OutputDirectory ${{ github.workspace }}\scripts\deploy -Version ${{ steps.versiontag.outputs.versiontag }} -InformationalVersion "Built from commit ${{ steps.gitversion.outputs.ShortSha }} on $(Get-Date -Format 'yyyy-MM-dd')" -SkipFrontendFiles ('${{ github.event_name == 'pull_request' }}' -eq 'true')
- name: Upload package to artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: copilotchat-webapi-${{ steps.versiontag.outputs.versiontag }}
path: ${{ github.workspace }}\scripts\deploy\out\webapi.zip
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/copilot-build-memorypipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
Write-Output "versiontag=$VERSION_TAG" >> $env:GITHUB_OUTPUT
- name: Set .Net Core version
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x

Expand All @@ -59,7 +59,7 @@ jobs:
scripts\deploy\package-memorypipeline.ps1 -Configuration Release -DotnetFramework net6.0 -TargetRuntime win-x64 -OutputDirectory ${{ github.workspace }}\scripts\deploy -Version ${{ steps.versiontag.outputs.versiontag }} -InformationalVersion "Built from commit ${{ steps.gitversion.outputs.ShortSha }} on $(Get-Date -Format "yyyy-MM-dd")"
- name: Upload package to artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: copilotchat-memorypipeline-${{ steps.versiontag.outputs.versiontag }}
path: ${{ github.workspace }}\scripts\deploy\out\memorypipeline.zip
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/copilot-build-plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
Write-Output "versiontag=$VERSION_TAG" >> $env:GITHUB_OUTPUT
- name: Set .Net Core version
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x

Expand All @@ -64,7 +64,7 @@ jobs:
-InformationalVersion "Built from commit ${{ steps.gitversion.outputs.ShortSha }} on $(Get-Date -Format "yyyy-MM-dd")"
- name: Upload packages to artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: copilotchat-plugins-${{ steps.versiontag.outputs.versiontag }}
path: ${{ github.workspace }}\scripts\deploy\out\plugins
Expand Down
19 changes: 6 additions & 13 deletions .github/workflows/copilot-deploy-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@ on:
DEPLOYMENT_NAME:
required: true
type: string
secrets:
AZURE_CLIENT_ID:
required: true
AZURE_TENANT_ID:
required: true
AZURE_SUBSCRIPTION_ID:
required: true
outputs:
backend-host:
description: "Host to which backend is deployed"
Expand Down Expand Up @@ -47,7 +40,7 @@ jobs:
sparse-checkout: |
scripts
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: ${{inputs.ARTIFACT_NAME}}
path: "${{ github.workspace }}/${{inputs.ARTIFACT_NAME}}"
Expand All @@ -57,11 +50,11 @@ jobs:
working-directory: "${{ github.workspace }}/${{inputs.ARTIFACT_NAME}}"

- name: Azure login
uses: azure/login@v1
uses: azure/login@v2
with:
client-id: ${{secrets.AZURE_CLIENT_ID}}
tenant-id: ${{secrets.AZURE_TENANT_ID}}
subscription-id: ${{secrets.AZURE_SUBSCRIPTION_ID}}
client-id: ${{vars.AZURE_GITHUB_ACCESS_APP_ID}}
tenant-id: ${{vars.AZURE_GITHUB_ACCESS_TENANT_ID}}
subscription-id: ${{vars.AZURE_GITHUB_ACCESS_SUB_ID}}
enable-AzPSSession: false

- name: Get app name
Expand All @@ -80,4 +73,4 @@ jobs:
- name: "Deploy"
run: |
scripts/deploy/deploy-webapi.sh -p "${{ github.workspace }}/${{inputs.ARTIFACT_NAME}}/webapi.zip" -d ${{inputs.DEPLOYMENT_NAME}} -s ${{secrets.AZURE_SUBSCRIPTION_ID}} -rg ${{vars.CC_DEPLOYMENT_GROUP_NAME}} --skip-app-registration
scripts/deploy/deploy-webapi.sh -p "${{ github.workspace }}/${{inputs.ARTIFACT_NAME}}/webapi.zip" -d ${{inputs.DEPLOYMENT_NAME}} -s ${{vars.AZURE_SUBSCRIPTION_ID}} -rg ${{vars.CC_DEPLOYMENT_GROUP_NAME}} --skip-app-registration
26 changes: 0 additions & 26 deletions .github/workflows/copilot-deploy-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,6 @@ on:
PLUGINS_ARTIFACT_NAME:
required: true
type: string
secrets:
AZURE_CLIENT_ID:
required: true
AZURE_TENANT_ID:
required: true
AZURE_SUBSCRIPTION_ID:
required: true
AZURE_OPENAI_ENDPOINT:
required: true
outputs:
backend-host:
description: "Host on which backend runs"
Expand All @@ -38,11 +29,6 @@ jobs:
uses: ./.github/workflows/copilot-deploy-infra.yml
with:
ENVIRONMENT: ${{inputs.ENVIRONMENT}}
secrets:
AZURE_CLIENT_ID: ${{secrets.AZURE_CLIENT_ID}}
AZURE_TENANT_ID: ${{secrets.AZURE_TENANT_ID}}
AZURE_SUBSCRIPTION_ID: ${{secrets.AZURE_SUBSCRIPTION_ID}}
AZURE_OPENAI_ENDPOINT: ${{secrets.AZURE_OPENAI_ENDPOINT}}

deploy-backend:
needs: [deploy-infra]
Expand All @@ -51,10 +37,6 @@ jobs:
ARTIFACT_NAME: ${{inputs.WEBAPI_ARTIFACT_NAME}}
DEPLOYMENT_NAME: ${{needs.deploy-infra.outputs.deployment-id}}
ENVIRONMENT: ${{inputs.ENVIRONMENT}}
secrets:
AZURE_CLIENT_ID: ${{secrets.AZURE_CLIENT_ID}}
AZURE_TENANT_ID: ${{secrets.AZURE_TENANT_ID}}
AZURE_SUBSCRIPTION_ID: ${{secrets.AZURE_SUBSCRIPTION_ID}}

deploy-memorypipeline:
needs: [deploy-infra]
Expand All @@ -63,10 +45,6 @@ jobs:
ARTIFACT_NAME: ${{inputs.MEMORYPIPELINE_ARTIFACT_NAME}}
DEPLOYMENT_NAME: ${{needs.deploy-infra.outputs.deployment-id}}
ENVIRONMENT: ${{inputs.ENVIRONMENT}}
secrets:
AZURE_CLIENT_ID: ${{secrets.AZURE_CLIENT_ID}}
AZURE_TENANT_ID: ${{secrets.AZURE_TENANT_ID}}
AZURE_SUBSCRIPTION_ID: ${{secrets.AZURE_SUBSCRIPTION_ID}}

deploy-plugins:
needs: [deploy-infra]
Expand All @@ -75,7 +53,3 @@ jobs:
ARTIFACT_NAME: ${{inputs.PLUGINS_ARTIFACT_NAME}}
DEPLOYMENT_NAME: ${{needs.deploy-infra.outputs.deployment-id}}
ENVIRONMENT: ${{inputs.ENVIRONMENT}}
secrets:
AZURE_CLIENT_ID: ${{secrets.AZURE_CLIENT_ID}}
AZURE_TENANT_ID: ${{secrets.AZURE_TENANT_ID}}
AZURE_SUBSCRIPTION_ID: ${{secrets.AZURE_SUBSCRIPTION_ID}}
22 changes: 6 additions & 16 deletions .github/workflows/copilot-deploy-infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,6 @@ on:
ENVIRONMENT:
required: true
type: string
secrets:
AZURE_CLIENT_ID:
required: true
AZURE_TENANT_ID:
required: true
AZURE_SUBSCRIPTION_ID:
required: true
AZURE_OPENAI_ENDPOINT:
required: true
outputs:
deployment-id:
description: "The Id of the current deployment."
Expand Down Expand Up @@ -45,20 +36,19 @@ jobs:
clean: true

- name: Azure login
uses: azure/login@v1
uses: azure/login@v2
with:
client-id: ${{secrets.AZURE_CLIENT_ID}}
tenant-id: ${{secrets.AZURE_TENANT_ID}}
subscription-id: ${{secrets.AZURE_SUBSCRIPTION_ID}}
client-id: ${{vars.AZURE_GITHUB_ACCESS_APP_ID}}
tenant-id: ${{vars.AZURE_GITHUB_ACCESS_TENANT_ID}}
subscription-id: ${{vars.AZURE_GITHUB_ACCESS_SUB_ID}}
enable-AzPSSession: false

- name: deploy-infra
uses: azure/CLI@v1
with:
azcliversion: 2.30.0
inlineScript: |
AI_SERVICE_KEY=$(az cognitiveservices account keys list --name ${{vars.AZUREOPENAI__NAME}} --resource-group ${{vars.AZUREOPENAI_DEPLOYMENT_GROUP_NAME}} | jq -r '.key1')
AI_SERVICE_KEY=$(az cognitiveservices account keys list --name ${{vars.AZURE_OPENAI_NAME}} --resource-group ${{vars.AZUREOPENAI_DEPLOYMENT_GROUP_NAME}} | jq -r '.key1')
echo "::add-mask::$AI_SERVICE_KEY"
APP_TENANT_ID=${{vars.APPLICATION_TENANT_ID}}
[ -z "$APP_TENANT_ID" ] && APP_TENANT_ID=${{secrets.AZURE_TENANT_ID}} # Use secrets.AZURE_TENANT_ID if vars.APPLICATION_TENANT_ID is not set
scripts/deploy/deploy-azure.sh --subscription ${{secrets.AZURE_SUBSCRIPTION_ID}} --resource-group ${{vars.CC_DEPLOYMENT_GROUP_NAME}} --deployment-name ${{steps.deployment-id.outputs.deployment_name}} --region ${{vars.CC_DEPLOYMENT_REGION}} --client-id ${{vars.BACKEND_CLIENT_ID}} --frontend-client-id ${{vars.APPLICATION_CLIENT_ID}} --tenant-id $APP_TENANT_ID --instance ${{vars.AZURE_INSTANCE}} --ai-service AzureOpenAI --ai-endpoint ${{secrets.AZURE_OPENAI_ENDPOINT}} --ai-service-key $AI_SERVICE_KEY --app-service-sku ${{vars.WEBAPP_API_SKU}} --no-deploy-package --debug-deployment --deploy-web-searcher-plugin
scripts/deploy/deploy-azure.sh --subscription ${{vars.AZURE_SUBSCRIPTION_ID}} --resource-group ${{vars.CC_DEPLOYMENT_GROUP_NAME}} --deployment-name ${{steps.deployment-id.outputs.deployment_name}} --region ${{vars.CC_DEPLOYMENT_REGION}} --client-id ${{vars.BACKEND_CLIENT_ID}} --frontend-client-id ${{vars.APPLICATION_CLIENT_ID}} --tenant-id $APP_TENANT_ID --instance ${{vars.AZURE_INSTANCE}} --ai-service AzureOpenAI --ai-endpoint ${{vars.AZURE_OPENAI_ENDPOINT}} --ai-service-key $AI_SERVICE_KEY --app-service-sku ${{vars.WEBAPP_API_SKU}} --no-deploy-package --debug-deployment --deploy-web-searcher-plugin
17 changes: 5 additions & 12 deletions .github/workflows/copilot-deploy-memorypipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@ on:
DEPLOYMENT_NAME:
required: true
type: string
secrets:
AZURE_CLIENT_ID:
required: true
AZURE_TENANT_ID:
required: true
AZURE_SUBSCRIPTION_ID:
required: true

permissions:
contents: read
Expand All @@ -39,7 +32,7 @@ jobs:
with:
clean: true

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: ${{inputs.ARTIFACT_NAME}}
path: "${{ github.workspace }}/${{inputs.ARTIFACT_NAME}}"
Expand All @@ -49,11 +42,11 @@ jobs:
working-directory: "${{ github.workspace }}/${{inputs.ARTIFACT_NAME}}"

- name: Azure login
uses: azure/login@v1
uses: azure/login@v2
with:
client-id: ${{secrets.AZURE_CLIENT_ID}}
tenant-id: ${{secrets.AZURE_TENANT_ID}}
subscription-id: ${{secrets.AZURE_SUBSCRIPTION_ID}}
client-id: ${{vars.AZURE_GITHUB_ACCESS_APP_ID}}
tenant-id: ${{vars.AZURE_GITHUB_ACCESS_TENANT_ID}}
subscription-id: ${{vars.AZURE_GITHUB_ACCESS_SUB_ID}}
enable-AzPSSession: false

- name: Get app name
Expand Down
11 changes: 1 addition & 10 deletions .github/workflows/copilot-deploy-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,13 @@ jobs:
WEBAPI_ARTIFACT_NAME: ${{needs.build-webapi.outputs.artifact}}
MEMORYPIPELINE_ARTIFACT_NAME: ${{needs.build-memorypipeline.outputs.artifact}}
PLUGINS_ARTIFACT_NAME: ${{needs.build-plugins.outputs.artifact}}
secrets:
AZURE_CLIENT_ID: ${{secrets.AZURE_CLIENT_ID}}
AZURE_TENANT_ID: ${{secrets.AZURE_TENANT_ID}}
AZURE_SUBSCRIPTION_ID: ${{secrets.AZURE_SUBSCRIPTION_ID}}
AZURE_OPENAI_ENDPOINT: ${{secrets.AZURE_OPENAI_ENDPOINT}}

int-tests:
uses: ./.github/workflows/copilot-run-integration-tests.yml
needs: int
with:
BACKEND_HOST: ${{needs.int.outputs.backend-host}}
ENVIRONMENT: int

stable:
needs: [int-tests, build-webapi, build-memorypipeline, build-plugins]
Expand All @@ -51,8 +47,3 @@ jobs:
WEBAPI_ARTIFACT_NAME: ${{needs.build-webapi.outputs.artifact}}
MEMORYPIPELINE_ARTIFACT_NAME: ${{needs.build-memorypipeline.outputs.artifact}}
PLUGINS_ARTIFACT_NAME: ${{needs.build-plugins.outputs.artifact}}
secrets:
AZURE_CLIENT_ID: ${{secrets.AZURE_CLIENT_ID}}
AZURE_TENANT_ID: ${{secrets.AZURE_TENANT_ID}}
AZURE_SUBSCRIPTION_ID: ${{secrets.AZURE_SUBSCRIPTION_ID}}
AZURE_OPENAI_ENDPOINT: ${{secrets.AZURE_OPENAI_ENDPOINT}}
19 changes: 6 additions & 13 deletions .github/workflows/copilot-deploy-plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@ on:
DEPLOYMENT_NAME:
required: true
type: string
secrets:
AZURE_CLIENT_ID:
required: true
AZURE_TENANT_ID:
required: true
AZURE_SUBSCRIPTION_ID:
required: true

permissions:
contents: read
Expand All @@ -44,7 +37,7 @@ jobs:
sudo apt update && sudo apt-get install curl -y
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: ${{inputs.ARTIFACT_NAME}}
path: "${{ github.workspace }}/${{inputs.ARTIFACT_NAME}}"
Expand All @@ -54,17 +47,17 @@ jobs:
working-directory: "${{ github.workspace }}/${{inputs.ARTIFACT_NAME}}"

- name: "Azure login"
uses: azure/login@v1
uses: azure/login@v2
with:
client-id: ${{secrets.AZURE_CLIENT_ID}}
tenant-id: ${{secrets.AZURE_TENANT_ID}}
subscription-id: ${{secrets.AZURE_SUBSCRIPTION_ID}}
client-id: ${{vars.AZURE_GITHUB_ACCESS_APP_ID}}
tenant-id: ${{vars.AZURE_GITHUB_ACCESS_TENANT_ID}}
subscription-id: ${{vars.AZURE_GITHUB_ACCESS_SUB_ID}}
enable-AzPSSession: false

- name: "Deploy"
run: |
scripts/deploy/deploy-plugins.sh \
--deployment-name ${{inputs.DEPLOYMENT_NAME}} \
--subscription ${{secrets.AZURE_SUBSCRIPTION_ID}} \
--subscription ${{vars.AZURE_SUBSCRIPTION_ID}} \
--resource-group ${{vars.CC_DEPLOYMENT_GROUP_NAME}} \
--packages "${{ github.workspace }}/${{inputs.ARTIFACT_NAME}}"
Loading

0 comments on commit 4de149e

Please sign in to comment.