Skip to content

Commit 34d01a3

Browse files
fix: Resolve merge conflicts with dev branch
Accept dev's workflow_dispatch-only trigger for azure-dev.yml. Update docker-build.yml paths to use correct src/App/ casing from dev, while keeping WebApp.Dockerfile and .dockerignore path entries. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2 parents 9bccc87 + 0a42e28 commit 34d01a3

File tree

147 files changed

+22613
-4319
lines changed

Some content is hidden

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

147 files changed

+22613
-4319
lines changed

.coverage

52 KB
Binary file not shown.

.env.sample

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ AZURE_AI_IMAGE_MODEL_DEPLOYMENT=gpt-image-1-mini
2323
# Azure OpenAI Configuration
2424
# =============================================================================
2525
AI_FOUNDRY_RESOURCE_ID=/subscriptions/your-subscription-id/resourceGroups/your-resource-group/providers/Microsoft.CognitiveServices/accounts/your-aif-account
26-
AZURE_EXISTING_AI_PROJECT_RESOURCE_ID=/subscriptions/your-subscription-id/resourceGroups/your-resource-group/providers/Microsoft.CognitiveServices/accounts/your-aif-account/projects/your-project-name
26+
AZURE_EXISTING_AIPROJECT_RESOURCE_ID=/subscriptions/your-subscription-id/resourceGroups/your-resource-group/providers/Microsoft.CognitiveServices/accounts/your-aif-account/projects/your-project-name
2727
# Your Azure OpenAI endpoint (e.g., https://your-resource.openai.azure.com/)
2828
AZURE_OPENAI_ENDPOINT=https://your-openai.openai.azure.com/
2929

3030
# Model deployments
31-
AZURE_OPENAI_GPT_MODEL=gpt-5.1
31+
AZURE_ENV_GPT_MODEL_NAME=gpt-5.1
3232

3333
# Image Generation Model Configuration
3434
# Supported models: gpt-image-1-mini or gpt-image-1.5
35-
AZURE_OPENAI_IMAGE_MODEL=gpt-image-1-mini
35+
AZURE_ENV_IMAGE_MODEL_NAME=gpt-image-1-mini
3636

3737
# For gpt-image-1-mini or gpt-image-1.5, the endpoint is the same as the main OpenAI endpoint, but you can specify a different one if needed
3838
AZURE_OPENAI_GPT_IMAGE_ENDPOINT=https://your-openai.openai.azure.com
@@ -43,7 +43,7 @@ AZURE_OPENAI_IMAGE_SIZE=1024x1024
4343
AZURE_OPENAI_IMAGE_QUALITY=medium
4444

4545
# API versions
46-
AZURE_OPENAI_API_VERSION=2024-06-01
46+
AZURE_ENV_OPENAI_API_VERSION=2024-06-01
4747
AZURE_OPENAI_PREVIEW_API_VERSION=2024-02-01
4848

4949
# Generation parameters

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ updates:
3535
# npm dependencies - grouped
3636
- package-ecosystem: "npm"
3737
directories:
38-
- "/src/app/frontend"
39-
- "/src/app/frontend-server"
38+
- "/src/App"
39+
- "/src/App/server"
4040
schedule:
4141
interval: "monthly"
4242
target-branch: "dependabotchanges"
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: AZD Template Validation
2+
on:
3+
schedule:
4+
- cron: '30 1 * * 4' # Every Thursday at 7:00 AM IST (1:30 AM UTC)
5+
workflow_dispatch:
6+
7+
permissions:
8+
contents: read
9+
id-token: write
10+
pull-requests: write
11+
jobs:
12+
template_validation:
13+
runs-on: ubuntu-latest
14+
environment: production
15+
name: azd template validation
16+
env:
17+
GH_TOKEN: ${{ github.token }}
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Set timestamp
22+
shell: bash
23+
run: echo "HHMM=$(date -u +'%H%M')" >> "$GITHUB_ENV"
24+
25+
- name: Validate Azure Template
26+
uses: microsoft/template-validation-action@v0.4.3
27+
with:
28+
validateAzd: ${{ vars.TEMPLATE_VALIDATE_AZD }}
29+
validateTests: ${{ vars.TEMPLATE_VALIDATE_TESTS }}
30+
useDevContainer: ${{ vars.TEMPLATE_USE_DEV_CONTAINER }}
31+
id: validation
32+
env:
33+
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
34+
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
35+
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
36+
AZURE_ENV_NAME: ${{ secrets.AZURE_ENV_NAME }}-${{ env.HHMM }}
37+
AZURE_LOCATION: ${{ secrets.AZURE_LOCATION }}
38+
AZURE_ENV_AI_SERVICE_LOCATION: ${{ secrets.AZURE_ENV_AI_SERVICE_LOCATION }}
39+
AZURE_AI_MODEL_CAPACITY: 1
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
42+
- name: print result
43+
run: cat ${{ steps.validation.outputs.resultFile }}

.github/workflows/azure-dev.yml

Lines changed: 57 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,73 @@
1-
name: Azure Template Validation
1+
name: Azure Dev Deploy
22
on:
33
workflow_dispatch:
4-
push:
5-
branches:
6-
- main
7-
paths:
8-
- 'infra/**'
9-
- 'azure*.yaml'
10-
- '.github/workflows/azure-dev.yml'
4+
115

126
permissions:
137
contents: read
148
id-token: write
15-
pull-requests: write
169

1710
jobs:
18-
template_validation_job:
11+
deploy:
1912
runs-on: ubuntu-latest
13+
name: azd deploy
2014
environment: production
21-
name: Template validation
22-
15+
env:
16+
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
17+
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
18+
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
19+
AZURE_ENV_NAME: ${{ secrets.AZURE_ENV_NAME }}
20+
AZURE_LOCATION: ${{ secrets.AZURE_LOCATION }}
21+
AZURE_ENV_AI_SERVICE_LOCATION: ${{ secrets.AZURE_ENV_AI_SERVICE_LOCATION }}
22+
AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID: ${{ secrets.AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID }}
23+
AZURE_EXISTING_AIPROJECT_RESOURCE_ID: ${{ secrets.AZURE_EXISTING_AIPROJECT_RESOURCE_ID }}
24+
AZURE_DEV_COLLECT_TELEMETRY: ${{ vars.AZURE_DEV_COLLECT_TELEMETRY }}
25+
2326
steps:
24-
# Step 1: Checkout the code from your repository
25-
- name: Checkout code
27+
- name: Checkout Code
2628
uses: actions/checkout@v4
2729

28-
# Step 2: Pre-authenticate Azure for azd validation
29-
- name: Login to Azure
30+
- name: Set timestamp and env name
3031
shell: bash
3132
run: |
32-
az login --service-principal -u "${{ secrets.AZURE_CLIENT_ID }}" -p "${{ secrets.AZURE_CLIENT_SECRET }}" --tenant "${{ secrets.AZURE_TENANT_ID }}"
33-
az account set --subscription "${{ secrets.AZURE_SUBSCRIPTION_ID }}"
34-
35-
# Step 3: Validate the Azure template using microsoft/template-validation-action
36-
- name: Validate Azure Template
37-
uses: microsoft/template-validation-action@v0.4.3
33+
HHMM=$(date -u +'%H%M')
34+
echo "AZURE_ENV_NAME=${AZURE_ENV_NAME}-${HHMM}" >> "$GITHUB_ENV"
35+
36+
- name: Install azd
37+
uses: Azure/setup-azd@v2
38+
39+
- name: Login to Azure
40+
uses: azure/login@v2
3841
with:
39-
workingDirectory: .
40-
validateAzd: ${{ vars.TEMPLATE_VALIDATE_AZD }}
41-
useDevContainer: ${{ vars.TEMPLATE_USE_DEV_CONTAINER }}
42-
validateTests: ${{ vars.TEMPLATE_VALIDATE_TESTS }}
43-
id: validation
44-
env:
45-
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
46-
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
47-
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
48-
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
49-
AZURE_ENV_NAME: ${{ secrets.AZURE_ENV_NAME }}
50-
AZURE_LOCATION: ${{ secrets.AZURE_LOCATION }}
51-
AZURE_ENV_OPENAI_LOCATION: ${{ secrets.AZURE_ENV_OPENAI_LOCATION }}
52-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53-
54-
# Step 4: Print the result of the validation
55-
- name: Print result
56-
run: cat ${{ steps.validation.outputs.resultFile }}
42+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
43+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
44+
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
45+
46+
- name: Login to AZD
47+
shell: bash
48+
run: |
49+
azd auth login \
50+
--client-id "$AZURE_CLIENT_ID" \
51+
--federated-credential-provider "github" \
52+
--tenant-id "$AZURE_TENANT_ID"
53+
54+
- name: Provision and Deploy
55+
shell: bash
56+
run: |
57+
if ! azd env select "$AZURE_ENV_NAME"; then
58+
azd env new "$AZURE_ENV_NAME" --subscription "$AZURE_SUBSCRIPTION_ID" --location "$AZURE_LOCATION" --no-prompt
59+
fi
60+
61+
azd config set defaults.subscription "$AZURE_SUBSCRIPTION_ID"
62+
63+
64+
if [[ -n "${AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID:-}" ]]; then
65+
azd env set AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID "$AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID"
66+
fi
67+
68+
if [[ -n "${AZURE_EXISTING_AIPROJECT_RESOURCE_ID:-}" ]]; then
69+
azd env set AZURE_EXISTING_AIPROJECT_RESOURCE_ID "$AZURE_EXISTING_AIPROJECT_RESOURCE_ID"
70+
fi
71+
72+
azd up --no-prompt
73+

.github/workflows/deploy-orchestrator.yml

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ on:
4242
required: false
4343
default: 'GoldenPath-Testing'
4444
type: string
45-
AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID:
45+
AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID:
4646
description: 'Log Analytics Workspace ID (Optional)'
4747
required: false
4848
default: ''
4949
type: string
50-
AZURE_EXISTING_AI_PROJECT_RESOURCE_ID:
50+
AZURE_EXISTING_AIPROJECT_RESOURCE_ID:
5151
description: 'AI Project Resource ID (Optional)'
5252
required: false
5353
default: ''
@@ -61,7 +61,7 @@ on:
6161
description: 'Trigger type (workflow_dispatch, pull_request, schedule)'
6262
required: true
6363
type: string
64-
image_model_choice:
64+
AZURE_ENV_IMAGE_MODEL_NAME:
6565
description: 'Image model to deploy (gpt-image-1-mini, gpt-image-1.5, none)'
6666
required: false
6767
default: 'gpt-image-1-mini'
@@ -91,12 +91,12 @@ jobs:
9191
EXP: ${{ inputs.EXP }}
9292
build_docker_image: ${{ inputs.build_docker_image }}
9393
existing_webapp_url: ${{ inputs.existing_webapp_url }}
94-
AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID: ${{ inputs.AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID }}
95-
AZURE_EXISTING_AI_PROJECT_RESOURCE_ID: ${{ inputs.AZURE_EXISTING_AI_PROJECT_RESOURCE_ID }}
96-
docker_image_tag: ${{ needs.docker-build.outputs.IMAGE_TAG }}
94+
AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID: ${{ inputs.AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID }}
95+
AZURE_EXISTING_AIPROJECT_RESOURCE_ID: ${{ inputs.AZURE_EXISTING_AIPROJECT_RESOURCE_ID }}
96+
docker_image_tag: ${{ needs.docker-build.outputs.AZURE_ENV_IMAGE_TAG }}
9797
run_e2e_tests: ${{ inputs.run_e2e_tests }}
9898
cleanup_resources: ${{ inputs.cleanup_resources }}
99-
image_model_choice: ${{ inputs.image_model_choice }}
99+
AZURE_ENV_IMAGE_MODEL_NAME: ${{ inputs.AZURE_ENV_IMAGE_MODEL_NAME }}
100100
secrets: inherit
101101

102102
e2e-test:
@@ -108,9 +108,25 @@ jobs:
108108
TEST_SUITE: ${{ inputs.trigger_type == 'workflow_dispatch' && inputs.run_e2e_tests || 'GoldenPath-Testing' }}
109109
secrets: inherit
110110

111+
cleanup-deployment:
112+
if: "!cancelled() && needs.deploy.outputs.RESOURCE_GROUP_NAME != '' && inputs.existing_webapp_url == '' && (inputs.trigger_type != 'workflow_dispatch' || inputs.cleanup_resources)"
113+
needs: [docker-build, deploy, e2e-test]
114+
uses: ./.github/workflows/job-cleanup-deployment.yml
115+
with:
116+
runner_os: ${{ inputs.runner_os }}
117+
trigger_type: ${{ inputs.trigger_type }}
118+
cleanup_resources: ${{ inputs.cleanup_resources }}
119+
existing_webapp_url: ${{ inputs.existing_webapp_url }}
120+
RESOURCE_GROUP_NAME: ${{ needs.deploy.outputs.RESOURCE_GROUP_NAME }}
121+
AZURE_LOCATION: ${{ needs.deploy.outputs.AZURE_LOCATION }}
122+
AZURE_ENV_AI_SERVICE_LOCATION: ${{ needs.deploy.outputs.AZURE_ENV_AI_SERVICE_LOCATION }}
123+
ENV_NAME: ${{ needs.deploy.outputs.ENV_NAME }}
124+
AZURE_ENV_IMAGE_TAG: ${{ needs.deploy.outputs.AZURE_ENV_IMAGE_TAG }}
125+
secrets: inherit
126+
111127
send-notification:
112128
if: "!cancelled()"
113-
needs: [docker-build, deploy, e2e-test]
129+
needs: [docker-build, deploy, e2e-test, cleanup-deployment]
114130
uses: ./.github/workflows/job-send-notification.yml
115131
with:
116132
trigger_type: ${{ inputs.trigger_type }}
@@ -125,20 +141,5 @@ jobs:
125141
QUOTA_FAILED: ${{ needs.deploy.outputs.QUOTA_FAILED }}
126142
TEST_SUCCESS: ${{ needs.e2e-test.outputs.TEST_SUCCESS }}
127143
TEST_REPORT_URL: ${{ needs.e2e-test.outputs.TEST_REPORT_URL }}
128-
secrets: inherit
129-
130-
cleanup-deployment:
131-
if: "!cancelled() && needs.deploy.outputs.RESOURCE_GROUP_NAME != '' && inputs.existing_webapp_url == '' && (inputs.trigger_type != 'workflow_dispatch' || inputs.cleanup_resources)"
132-
needs: [docker-build, deploy, e2e-test]
133-
uses: ./.github/workflows/job-cleanup-deployment.yml
134-
with:
135-
runner_os: ${{ inputs.runner_os }}
136-
trigger_type: ${{ inputs.trigger_type }}
137-
cleanup_resources: ${{ inputs.cleanup_resources }}
138-
existing_webapp_url: ${{ inputs.existing_webapp_url }}
139-
RESOURCE_GROUP_NAME: ${{ needs.deploy.outputs.RESOURCE_GROUP_NAME }}
140-
AZURE_LOCATION: ${{ needs.deploy.outputs.AZURE_LOCATION }}
141-
AZURE_ENV_OPENAI_LOCATION: ${{ needs.deploy.outputs.AZURE_ENV_OPENAI_LOCATION }}
142-
ENV_NAME: ${{ needs.deploy.outputs.ENV_NAME }}
143-
IMAGE_TAG: ${{ needs.deploy.outputs.IMAGE_TAG }}
144+
cleanup_result: ${{ needs.cleanup-deployment.result }}
144145
secrets: inherit

0 commit comments

Comments
 (0)