Skip to content

Commit da41343

Browse files
2 parents 04e541a + c32d133 commit da41343

19 files changed

+1904
-580
lines changed

.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/deploy-linux.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Deploy-Test-Cleanup Linux
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+
- 'centralus'
16+
- 'eastasia'
17+
- 'eastus2'
18+
- 'japaneast'
19+
- 'northeurope'
20+
- 'southeastasia'
21+
- 'uksouth'
22+
resource_group_name:
23+
description: 'Resource Group Name (Optional)'
24+
required: false
25+
default: ''
26+
type: string
27+
waf_enabled:
28+
description: 'Enable WAF'
29+
required: false
30+
default: false
31+
type: boolean
32+
exp:
33+
description: 'Enable EXP'
34+
required: false
35+
default: false
36+
type: boolean
37+
build_docker_image:
38+
description: 'Build And Push Docker Image (Optional)'
39+
required: false
40+
default: false
41+
type: boolean
42+
cleanup_resources:
43+
description: 'Cleanup Deployed Resources'
44+
required: false
45+
default: false
46+
type: boolean
47+
run_e2e_tests:
48+
description: 'Run End-to-End Tests'
49+
required: false
50+
default: 'GoldenPath-Testing'
51+
type: choice
52+
options:
53+
- 'GoldenPath-Testing'
54+
- 'Smoke-Testing'
55+
- 'None'
56+
azure_env_log_anlytics_workspace_id:
57+
description: 'Log Analytics Workspace ID (Optional)'
58+
required: false
59+
default: ''
60+
type: string
61+
azure_existing_ai_project_resource_id:
62+
description: 'AI Project Resource ID (Optional)'
63+
required: false
64+
default: ''
65+
type: string
66+
existing_webapp_url:
67+
description: 'Existing WebApp URL (Skips Deployment)'
68+
required: false
69+
default: ''
70+
type: string
71+
72+
jobs:
73+
Run:
74+
uses: ./.github/workflows/deploy-orchestrator.yml
75+
with:
76+
runner_os: ubuntu-latest
77+
azure_location: ${{ github.event.inputs.azure_location || 'australiaeast' }}
78+
resource_group_name: ${{ github.event.inputs.resource_group_name || '' }}
79+
waf_enabled: ${{ github.event.inputs.waf_enabled == 'true' }}
80+
exp: ${{ github.event.inputs.exp == 'true' }}
81+
build_docker_image: ${{ github.event.inputs.build_docker_image == 'true' }}
82+
cleanup_resources: ${{ github.event.inputs.cleanup_resources == 'true' }}
83+
run_e2e_tests: ${{ github.event.inputs.run_e2e_tests || 'GoldenPath-Testing' }}
84+
azure_env_log_anlytics_workspace_id: ${{ github.event.inputs.azure_env_log_anlytics_workspace_id || '' }}
85+
azure_existing_ai_project_resource_id: ${{ github.event.inputs.azure_existing_ai_project_resource_id || '' }}
86+
existing_webapp_url: ${{ github.event.inputs.existing_webapp_url || '' }}
87+
trigger_type: ${{ github.event_name }}
88+
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: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
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+
- 'centralus'
16+
- 'eastasia'
17+
- 'eastus2'
18+
- 'japaneast'
19+
- 'northeurope'
20+
- 'southeastasia'
21+
- 'uksouth'
22+
resource_group_name:
23+
description: 'Resource Group Name (Optional)'
24+
required: false
25+
default: ''
26+
type: string
27+
waf_enabled:
28+
description: 'Enable WAF'
29+
required: false
30+
default: false
31+
type: boolean
32+
exp:
33+
description: 'Enable EXP'
34+
required: false
35+
default: false
36+
type: boolean
37+
build_docker_image:
38+
description: 'Build And Push Docker Image (Optional)'
39+
required: false
40+
default: false
41+
type: boolean
42+
cleanup_resources:
43+
description: 'Cleanup Deployed Resources'
44+
required: false
45+
default: false
46+
type: boolean
47+
run_e2e_tests:
48+
description: 'Run End-to-End Tests'
49+
required: false
50+
default: 'GoldenPath-Testing'
51+
type: choice
52+
options:
53+
- 'GoldenPath-Testing'
54+
- 'Smoke-Testing'
55+
- 'None'
56+
azure_env_log_anlytics_workspace_id:
57+
description: 'Log Analytics Workspace ID (Optional)'
58+
required: false
59+
default: ''
60+
type: string
61+
azure_existing_ai_project_resource_id:
62+
description: 'AI Project Resource ID (Optional)'
63+
required: false
64+
default: ''
65+
type: string
66+
existing_webapp_url:
67+
description: 'Existing WebApp URL (Skips Deployment)'
68+
required: false
69+
default: ''
70+
type: string
71+
72+
jobs:
73+
Run:
74+
uses: ./.github/workflows/deploy-orchestrator.yml
75+
with:
76+
runner_os: windows-latest
77+
azure_location: ${{ github.event.inputs.azure_location || 'australiaeast' }}
78+
resource_group_name: ${{ github.event.inputs.resource_group_name || '' }}
79+
waf_enabled: ${{ github.event.inputs.waf_enabled == 'true' }}
80+
exp: ${{ github.event.inputs.exp == 'true' }}
81+
build_docker_image: ${{ github.event.inputs.build_docker_image == 'true' }}
82+
cleanup_resources: ${{ github.event.inputs.cleanup_resources == 'true' }}
83+
run_e2e_tests: ${{ github.event.inputs.run_e2e_tests || 'GoldenPath-Testing' }}
84+
azure_env_log_anlytics_workspace_id: ${{ github.event.inputs.azure_env_log_anlytics_workspace_id || '' }}
85+
azure_existing_ai_project_resource_id: ${{ github.event.inputs.azure_existing_ai_project_resource_id || '' }}
86+
existing_webapp_url: ${{ github.event.inputs.existing_webapp_url || '' }}
87+
trigger_type: ${{ github.event_name }}
88+
secrets: inherit

0 commit comments

Comments
 (0)