Skip to content

Commit 82e983e

Browse files
2 parents 8100f84 + 3890623 commit 82e983e

File tree

77 files changed

+339496
-30240
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+339496
-30240
lines changed

.devcontainer/devcontainer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
"features": {
66
"ghcr.io/azure/azure-dev/azd:latest": {},
77
"ghcr.io/devcontainers/features/azure-cli:1": {},
8-
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
8+
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
9+
"ghcr.io/jlaundry/devcontainer-features/mssql-odbc-driver:1": {
10+
"version": "18"
11+
}
912
},
1013
"customizations": {
1114
"vscode": {

.devcontainer/setup_env.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ git pull
66
# provide execute permission to quotacheck script
77
sudo chmod +x ./infra/scripts/checkquota_km.sh
88
sudo chmod +x ./infra/scripts/quota_check_params.sh
9-
sudo chmod +x ./infra/scripts/run_process_data_scripts.sh
9+
sudo chmod +x ./infra/scripts/process_sample_data.sh
10+
sudo chmod +x ./infra/scripts/process_custom_data.sh

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Each line is a file pattern followed by one or more owners.
33

44
# These owners will be the default owners for everything in the repo.
5-
* @Avijit-Microsoft @Roopan-Microsoft @Prajwal-Microsoft @aniaroramsft @brittneek @Vinay-Microsoft @toherman-msft @nchandhi
5+
* @Avijit-Microsoft @Roopan-Microsoft @Prajwal-Microsoft @aniaroramsft @brittneek @Vinay-Microsoft @toherman-msft @nchandhi @dgp10801

.github/workflows/codeql.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,15 @@ name: "CodeQL"
1414
on:
1515
push:
1616
branches: [ "main" ]
17+
paths:
18+
- '**/*.py'
19+
- '.github/workflows/codeql.yml'
1720
pull_request:
1821
# The branches below must be a subset of the branches above
1922
branches: [ "main" ]
23+
paths:
24+
- '**/*.py'
25+
- '.github/workflows/codeql.yml'
2026
schedule:
2127
- cron: '17 11 * * 0'
2228

.github/workflows/deploy-KMGeneric.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ jobs:
124124
az deployment group create \
125125
--resource-group ${{ env.RESOURCE_GROUP_NAME }} \
126126
--template-file infra/main.bicep \
127-
--parameters solutionName=${{env.SOLUTION_PREFIX}} location="${{ env.AZURE_LOCATION }}" contentUnderstandingLocation="swedencentral" secondaryLocation="${{ env.AZURE_LOCATION }}" gptDeploymentCapacity=150 aiServiceLocation="${{ env.AZURE_LOCATION }}" createdBy="Pipeline" tags="{'SecurityControl':'Ignore','Purpose':'Deploying and Cleaning Up Resources for Validation','CreatedDate':'$current_date'}"
127+
--parameters solutionName=${{env.SOLUTION_PREFIX}} location="${{ env.AZURE_LOCATION }}" contentUnderstandingLocation="swedencentral" secondaryLocation="${{ env.AZURE_LOCATION }}" gptDeploymentCapacity=150 aiServiceLocation="${{ env.AZURE_LOCATION }}" createdBy="Pipeline" tags="{'Purpose':'Deploying and Cleaning Up Resources for Validation','CreatedDate':'$current_date'}"
128128
129129
130130

.github/workflows/deploy-linux.yml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: Deploy-Test-Cleanup Linux
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
paths:
7+
- 'src/App/**/*.js'
8+
- 'src/App/**/*.jsx'
9+
- 'src/App/**/*.ts'
10+
- 'src/App/**/*.tsx'
11+
- 'src/App/**/*.html'
12+
- 'src/App/**/*.css'
13+
- 'src/App/**/*.scss'
14+
- 'src/App/**/*.json'
15+
- 'src/**/*.py'
16+
- 'src/api/requirements.txt'
17+
- 'src/**/*.Dockerfile'
18+
- 'infra/**/*.bicep'
19+
- 'infra/**/*.json'
20+
- 'azure.yaml'
21+
- '.github/workflows/deploy-*.yml'
22+
workflow_dispatch:
23+
inputs:
24+
azure_location:
25+
description: 'Azure Location For Deployment'
26+
required: false
27+
default: 'australiaeast'
28+
type: choice
29+
options:
30+
- 'australiaeast'
31+
- 'eastus'
32+
- 'eastus2'
33+
- 'francecentral'
34+
- 'japaneast'
35+
- 'swedencentral'
36+
- 'uksouth'
37+
- 'westus'
38+
- 'westus2'
39+
resource_group_name:
40+
description: 'Resource Group Name (Optional)'
41+
required: false
42+
default: ''
43+
type: string
44+
waf_enabled:
45+
description: 'Enable WAF'
46+
required: false
47+
default: false
48+
type: boolean
49+
exp:
50+
description: 'Enable EXP'
51+
required: false
52+
default: false
53+
type: boolean
54+
build_docker_image:
55+
description: 'Build And Push Docker Image (Optional)'
56+
required: false
57+
default: false
58+
type: boolean
59+
cleanup_resources:
60+
description: 'Cleanup Deployed Resources'
61+
required: false
62+
default: false
63+
type: boolean
64+
run_e2e_tests:
65+
description: 'Run End-to-End Tests'
66+
required: false
67+
default: 'GoldenPath-Testing'
68+
type: choice
69+
options:
70+
- 'GoldenPath-Testing'
71+
- 'Smoke-Testing'
72+
- 'None'
73+
azure_env_log_anlytics_workspace_id:
74+
description: 'Log Analytics Workspace ID (Optional)'
75+
required: false
76+
default: ''
77+
type: string
78+
azure_existing_ai_project_resource_id:
79+
description: 'AI Project Resource ID (Optional)'
80+
required: false
81+
default: ''
82+
type: string
83+
existing_webapp_url:
84+
description: 'Existing WebApp URL (Skips Deployment)'
85+
required: false
86+
default: ''
87+
type: string
88+
89+
jobs:
90+
Run:
91+
uses: ./.github/workflows/deploy-orchestrator.yml
92+
with:
93+
runner_os: ubuntu-latest
94+
azure_location: ${{ github.event.inputs.azure_location || 'australiaeast' }}
95+
resource_group_name: ${{ github.event.inputs.resource_group_name || '' }}
96+
waf_enabled: ${{ github.event.inputs.waf_enabled == 'true' }}
97+
exp: ${{ github.event.inputs.exp == 'true' }}
98+
build_docker_image: ${{ github.event.inputs.build_docker_image == 'true' }}
99+
cleanup_resources: ${{ github.event.inputs.cleanup_resources == 'true' }}
100+
run_e2e_tests: ${{ github.event.inputs.run_e2e_tests || 'GoldenPath-Testing' }}
101+
azure_env_log_anlytics_workspace_id: ${{ github.event.inputs.azure_env_log_anlytics_workspace_id || '' }}
102+
azure_existing_ai_project_resource_id: ${{ github.event.inputs.azure_existing_ai_project_resource_id || '' }}
103+
existing_webapp_url: ${{ github.event.inputs.existing_webapp_url || '' }}
104+
trigger_type: ${{ github.event_name }}
105+
secrets: inherit
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
name: Deployment orchestrator
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
runner_os:
7+
description: 'Runner OS (ubuntu-latest or windows-latest)'
8+
required: true
9+
type: string
10+
azure_location:
11+
description: 'Azure Location For Deployment'
12+
required: false
13+
default: 'australiaeast'
14+
type: string
15+
resource_group_name:
16+
description: 'Resource Group Name (Optional)'
17+
required: false
18+
default: ''
19+
type: string
20+
waf_enabled:
21+
description: 'Enable WAF'
22+
required: false
23+
default: false
24+
type: boolean
25+
exp:
26+
description: 'Enable EXP'
27+
required: false
28+
default: false
29+
type: boolean
30+
build_docker_image:
31+
description: 'Build And Push Docker Image (Optional)'
32+
required: false
33+
default: false
34+
type: boolean
35+
cleanup_resources:
36+
description: 'Cleanup Deployed Resources'
37+
required: false
38+
default: false
39+
type: boolean
40+
run_e2e_tests:
41+
description: 'Run End-to-End Tests'
42+
required: false
43+
default: 'GoldenPath-Testing'
44+
type: string
45+
azure_env_log_anlytics_workspace_id:
46+
description: 'Log Analytics Workspace ID (Optional)'
47+
required: false
48+
default: ''
49+
type: string
50+
azure_existing_ai_project_resource_id:
51+
description: 'AI Project Resource ID (Optional)'
52+
required: false
53+
default: ''
54+
type: string
55+
existing_webapp_url:
56+
description: 'Existing WebApp URL (Skips Deployment)'
57+
required: false
58+
default: ''
59+
type: string
60+
trigger_type:
61+
description: 'Trigger type (workflow_dispatch, pull_request, schedule)'
62+
required: true
63+
type: string
64+
65+
env:
66+
AZURE_DEV_COLLECT_TELEMETRY: ${{ vars.AZURE_DEV_COLLECT_TELEMETRY }}
67+
68+
jobs:
69+
docker-build:
70+
uses: ./.github/workflows/job-docker-build.yml
71+
with:
72+
trigger_type: ${{ inputs.trigger_type }}
73+
build_docker_image: ${{ inputs.build_docker_image }}
74+
secrets: inherit
75+
76+
deploy:
77+
if: always() && (inputs.trigger_type != 'workflow_dispatch' || inputs.existing_webapp_url == '' || inputs.existing_webapp_url == null)
78+
needs: docker-build
79+
uses: ./.github/workflows/job-azure-deploy.yml
80+
with:
81+
trigger_type: ${{ inputs.trigger_type }}
82+
runner_os: ${{ inputs.runner_os }}
83+
azure_location: ${{ inputs.azure_location }}
84+
resource_group_name: ${{ inputs.resource_group_name }}
85+
waf_enabled: ${{ inputs.waf_enabled }}
86+
exp: ${{ inputs.exp }}
87+
build_docker_image: ${{ inputs.build_docker_image }}
88+
existing_webapp_url: ${{ inputs.existing_webapp_url }}
89+
azure_env_log_anlytics_workspace_id: ${{ inputs.azure_env_log_anlytics_workspace_id }}
90+
azure_existing_ai_project_resource_id: ${{ inputs.azure_existing_ai_project_resource_id }}
91+
docker_image_tag: ${{ needs.docker-build.outputs.IMAGE_TAG }}
92+
run_e2e_tests: ${{ inputs.run_e2e_tests }}
93+
cleanup_resources: ${{ inputs.cleanup_resources }}
94+
secrets: inherit
95+
96+
e2e-test:
97+
if: always() && ((needs.deploy.result == 'success' && needs.deploy.outputs.WEB_APP_URL != '') || (inputs.existing_webapp_url != '' && inputs.existing_webapp_url != null)) && (inputs.trigger_type != 'workflow_dispatch' || (inputs.run_e2e_tests != 'None' && inputs.run_e2e_tests != '' && inputs.run_e2e_tests != null))
98+
needs: [docker-build, deploy]
99+
uses: ./.github/workflows/job-test-automation.yml
100+
with:
101+
KMGENERIC_URL: ${{ needs.deploy.outputs.WEB_APP_URL || inputs.existing_webapp_url }}
102+
KMGENERIC_URL_API: ${{ needs.deploy.outputs.API_APP_URL || inputs.existing_webapp_url }}
103+
TEST_SUITE: ${{ inputs.trigger_type == 'workflow_dispatch' && inputs.run_e2e_tests || 'GoldenPath-Testing' }}
104+
secrets: inherit
105+
106+
send-notification:
107+
if: always()
108+
needs: [docker-build, deploy, e2e-test]
109+
uses: ./.github/workflows/job-send-notifications.yml
110+
with:
111+
trigger_type: ${{ inputs.trigger_type }}
112+
waf_enabled: ${{ inputs.waf_enabled }}
113+
exp: ${{ inputs.exp }}
114+
run_e2e_tests: ${{ inputs.run_e2e_tests }}
115+
existing_webapp_url: ${{ inputs.existing_webapp_url }}
116+
deploy_result: ${{ needs.deploy.result }}
117+
e2e_test_result: ${{ needs.e2e-test.result }}
118+
web_app_url: ${{ needs.deploy.outputs.WEB_APP_URL }}
119+
resource_group_name: ${{ needs.deploy.outputs.RESOURCE_GROUP_NAME }}
120+
quota_failed: ${{ needs.deploy.outputs.QUOTA_FAILED }}
121+
test_success: ${{ needs.e2e-test.outputs.TEST_SUCCESS }}
122+
test_report_url: ${{ needs.e2e-test.outputs.TEST_REPORT_URL }}
123+
secrets: inherit
124+
125+
cleanup-deployment:
126+
if: always() && needs.deploy.result == 'success' && needs.deploy.outputs.RESOURCE_GROUP_NAME != '' && inputs.existing_webapp_url == '' && (inputs.trigger_type != 'workflow_dispatch' || inputs.cleanup_resources)
127+
needs: [docker-build, deploy, e2e-test]
128+
uses: ./.github/workflows/job-cleanup-resources.yml
129+
with:
130+
runner_os: ${{ inputs.runner_os }}
131+
trigger_type: ${{ inputs.trigger_type }}
132+
cleanup_resources: ${{ inputs.cleanup_resources }}
133+
existing_webapp_url: ${{ inputs.existing_webapp_url }}
134+
resource_group_name: ${{ needs.deploy.outputs.RESOURCE_GROUP_NAME }}
135+
azure_location: ${{ needs.deploy.outputs.AZURE_LOCATION }}
136+
azure_env_openai_location: ${{ needs.deploy.outputs.AZURE_ENV_OPENAI_LOCATION }}
137+
env_name: ${{ needs.deploy.outputs.ENV_NAME }}
138+
image_tag: ${{ needs.deploy.outputs.IMAGE_TAG }}
139+
secrets: inherit
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Deploy-Test-Cleanup Windows
2+
on:
3+
# push:
4+
# branches:
5+
# - main
6+
workflow_dispatch:
7+
inputs:
8+
azure_location:
9+
description: 'Azure Location For Deployment'
10+
required: false
11+
default: 'australiaeast'
12+
type: choice
13+
options:
14+
- 'australiaeast'
15+
- 'eastus'
16+
- 'eastus2'
17+
- 'francecentral'
18+
- 'japaneast'
19+
- 'swedencentral'
20+
- 'uksouth'
21+
- 'westus'
22+
- 'westus2'
23+
resource_group_name:
24+
description: 'Resource Group Name (Optional)'
25+
required: false
26+
default: ''
27+
type: string
28+
waf_enabled:
29+
description: 'Enable WAF'
30+
required: false
31+
default: false
32+
type: boolean
33+
exp:
34+
description: 'Enable EXP'
35+
required: false
36+
default: false
37+
type: boolean
38+
build_docker_image:
39+
description: 'Build And Push Docker Image (Optional)'
40+
required: false
41+
default: false
42+
type: boolean
43+
cleanup_resources:
44+
description: 'Cleanup Deployed Resources'
45+
required: false
46+
default: false
47+
type: boolean
48+
run_e2e_tests:
49+
description: 'Run End-to-End Tests'
50+
required: false
51+
default: 'GoldenPath-Testing'
52+
type: choice
53+
options:
54+
- 'GoldenPath-Testing'
55+
- 'Smoke-Testing'
56+
- 'None'
57+
azure_env_log_anlytics_workspace_id:
58+
description: 'Log Analytics Workspace ID (Optional)'
59+
required: false
60+
default: ''
61+
type: string
62+
azure_existing_ai_project_resource_id:
63+
description: 'AI Project Resource ID (Optional)'
64+
required: false
65+
default: ''
66+
type: string
67+
existing_webapp_url:
68+
description: 'Existing WebApp URL (Skips Deployment)'
69+
required: false
70+
default: ''
71+
type: string
72+
73+
jobs:
74+
Run:
75+
uses: ./.github/workflows/deploy-orchestrator.yml
76+
with:
77+
runner_os: windows-latest
78+
azure_location: ${{ github.event.inputs.azure_location || 'australiaeast' }}
79+
resource_group_name: ${{ github.event.inputs.resource_group_name || '' }}
80+
waf_enabled: ${{ github.event.inputs.waf_enabled == 'true' }}
81+
exp: ${{ github.event.inputs.exp == 'true' }}
82+
build_docker_image: ${{ github.event.inputs.build_docker_image == 'true' }}
83+
cleanup_resources: ${{ github.event.inputs.cleanup_resources == 'true' }}
84+
run_e2e_tests: ${{ github.event.inputs.run_e2e_tests || 'GoldenPath-Testing' }}
85+
azure_env_log_anlytics_workspace_id: ${{ github.event.inputs.azure_env_log_anlytics_workspace_id || '' }}
86+
azure_existing_ai_project_resource_id: ${{ github.event.inputs.azure_existing_ai_project_resource_id || '' }}
87+
existing_webapp_url: ${{ github.event.inputs.existing_webapp_url || '' }}
88+
trigger_type: ${{ github.event_name }}
89+
secrets: inherit

.github/workflows/deploy.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
push:
66
branches:
77
- main
8+
paths:
9+
- 'docs/workshop/**'
10+
- '.github/workflows/deploy.yml'
811

912
permissions:
1013
contents: write

0 commit comments

Comments
 (0)