Skip to content

Commit 47cc477

Browse files
Merge remote-tracking branch 'origin/dev' into PSL-US-27295
2 parents e4ac0bc + 1586aa6 commit 47cc477

20 files changed

+2027
-1458
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
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-
* @toherman-msft @Avijit-Microsoft @Roopan-Microsoft @Prajwal-Microsoft @Vinay-Microsoft @malrose07 @aniaroramsft @nchandhi
5+
* @toherman-msft @Avijit-Microsoft @Roopan-Microsoft @Prajwal-Microsoft @Vinay-Microsoft @malrose07 @aniaroramsft @nchandhi @dgp10801
66

.github/workflows/deploy-linux.yml

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
name: Deploy-Test-Cleanup (v2) Linux
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
paths:
7+
- 'src/frontend/**'
8+
- 'src/**/*.py'
9+
- 'src/requirements*.txt'
10+
- 'src/WebApp.Dockerfile'
11+
- '!src/tests/**'
12+
- 'infra/**/*.bicep'
13+
- 'infra/**/*.json'
14+
- '*.yaml'
15+
- '.github/workflows/deploy-*.yml'
16+
workflow_run:
17+
workflows: ["Build Docker and Optional Push"]
18+
types:
19+
- completed
20+
branches:
21+
- main
22+
- dev
23+
- demo
24+
workflow_dispatch:
25+
inputs:
26+
azure_location:
27+
description: 'Azure Location For Deployment'
28+
required: false
29+
default: 'australiaeast'
30+
type: choice
31+
options:
32+
- 'australiaeast'
33+
- 'centralus'
34+
- 'eastasia'
35+
- 'eastus2'
36+
- 'japaneast'
37+
- 'northeurope'
38+
- 'southeastasia'
39+
- 'uksouth'
40+
resource_group_name:
41+
description: 'Resource Group Name (Optional)'
42+
required: false
43+
default: ''
44+
type: string
45+
46+
waf_enabled:
47+
description: 'Enable WAF'
48+
required: false
49+
default: false
50+
type: boolean
51+
EXP:
52+
description: 'Enable EXP'
53+
required: false
54+
default: false
55+
type: boolean
56+
build_docker_image:
57+
description: 'Build And Push Docker Image (Optional)'
58+
required: false
59+
default: false
60+
type: boolean
61+
62+
cleanup_resources:
63+
description: 'Cleanup Deployed Resources'
64+
required: false
65+
default: false
66+
type: boolean
67+
68+
run_e2e_tests:
69+
description: 'Run End-to-End Tests'
70+
required: false
71+
default: 'GoldenPath-Testing'
72+
type: choice
73+
options:
74+
- 'GoldenPath-Testing'
75+
- 'Smoke-Testing'
76+
- 'None'
77+
78+
AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID:
79+
description: 'Log Analytics Workspace ID (Optional)'
80+
required: false
81+
default: ''
82+
type: string
83+
AZURE_EXISTING_AI_PROJECT_RESOURCE_ID:
84+
description: 'AI Project Resource ID (Optional)'
85+
required: false
86+
default: ''
87+
type: string
88+
existing_webapp_url:
89+
description: 'Existing WebApp URL (Skips Deployment)'
90+
required: false
91+
default: ''
92+
type: string
93+
94+
schedule:
95+
- cron: '0 9,21 * * *' # Runs at 9:00 AM and 9:00 PM GMT
96+
97+
jobs:
98+
Run:
99+
uses: ./.github/workflows/deploy-orchestrator.yml
100+
with:
101+
runner_os: ubuntu-latest
102+
azure_location: ${{ github.event.inputs.azure_location || 'australiaeast' }}
103+
resource_group_name: ${{ github.event.inputs.resource_group_name || '' }}
104+
waf_enabled: ${{ github.event.inputs.waf_enabled == 'true' }}
105+
EXP: ${{ github.event.inputs.EXP == 'true' }}
106+
build_docker_image: ${{ github.event.inputs.build_docker_image == 'true' }}
107+
cleanup_resources: ${{ github.event.inputs.cleanup_resources == 'true' }}
108+
run_e2e_tests: ${{ github.event.inputs.run_e2e_tests || 'GoldenPath-Testing' }}
109+
AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID: ${{ github.event.inputs.AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID || '' }}
110+
AZURE_EXISTING_AI_PROJECT_RESOURCE_ID: ${{ github.event.inputs.AZURE_EXISTING_AI_PROJECT_RESOURCE_ID || '' }}
111+
existing_webapp_url: ${{ github.event.inputs.existing_webapp_url || '' }}
112+
trigger_type: ${{ github.event_name }}
113+
secrets: inherit
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
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_ANALYTICS_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 Container 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-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_ANALYTICS_WORKSPACE_ID: ${{ inputs.AZURE_ENV_LOG_ANALYTICS_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_APPURL != '') || (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/test-automation-v2.yml
100+
with:
101+
DOCGEN_URL: ${{ needs.deploy.outputs.WEB_APPURL || inputs.existing_webapp_url }}
102+
TEST_SUITE: ${{ inputs.trigger_type == 'workflow_dispatch' && inputs.run_e2e_tests || 'GoldenPath-Testing' }}
103+
secrets: inherit
104+
105+
send-notification:
106+
if: always()
107+
needs: [docker-build, deploy, e2e-test]
108+
uses: ./.github/workflows/job-send-notification.yml
109+
with:
110+
trigger_type: ${{ inputs.trigger_type }}
111+
waf_enabled: ${{ inputs.waf_enabled }}
112+
EXP: ${{ inputs.EXP }}
113+
run_e2e_tests: ${{ inputs.run_e2e_tests }}
114+
existing_webapp_url: ${{ inputs.existing_webapp_url }}
115+
deploy_result: ${{ needs.deploy.result }}
116+
e2e_test_result: ${{ needs.e2e-test.result }}
117+
WEB_APPURL: ${{ needs.deploy.outputs.WEB_APPURL || inputs.existing_webapp_url }}
118+
RESOURCE_GROUP_NAME: ${{ needs.deploy.outputs.RESOURCE_GROUP_NAME }}
119+
QUOTA_FAILED: ${{ needs.deploy.outputs.QUOTA_FAILED }}
120+
TEST_SUCCESS: ${{ needs.e2e-test.outputs.TEST_SUCCESS }}
121+
TEST_REPORT_URL: ${{ needs.e2e-test.outputs.TEST_REPORT_URL }}
122+
secrets: inherit
123+
124+
cleanup-deployment:
125+
if: always() && needs.deploy.result == 'success' && needs.deploy.outputs.RESOURCE_GROUP_NAME != '' && inputs.existing_webapp_url == '' && (inputs.trigger_type != 'workflow_dispatch' || inputs.cleanup_resources)
126+
needs: [docker-build, deploy, e2e-test]
127+
uses: ./.github/workflows/job-cleanup-deployment.yml
128+
with:
129+
runner_os: ${{ inputs.runner_os }}
130+
trigger_type: ${{ inputs.trigger_type }}
131+
cleanup_resources: ${{ inputs.cleanup_resources }}
132+
existing_webapp_url: ${{ inputs.existing_webapp_url }}
133+
RESOURCE_GROUP_NAME: ${{ needs.deploy.outputs.RESOURCE_GROUP_NAME }}
134+
AZURE_LOCATION: ${{ needs.deploy.outputs.AZURE_LOCATION }}
135+
AZURE_ENV_OPENAI_LOCATION: ${{ needs.deploy.outputs.AZURE_ENV_OPENAI_LOCATION }}
136+
ENV_NAME: ${{ needs.deploy.outputs.ENV_NAME }}
137+
IMAGE_TAG: ${{ needs.deploy.outputs.IMAGE_TAG }}
138+
secrets: inherit

0 commit comments

Comments
 (0)