Skip to content

Commit 63a9979

Browse files
Merge pull request #910 from microsoft/dev-v4
feat: merging dev to main
2 parents 6a3dda5 + 67e7204 commit 63a9979

214 files changed

Lines changed: 4668 additions & 11332 deletions

File tree

Some content is hidden

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

.azdo/pipelines/azure-dev.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,20 @@
11
# Run when commits are pushed to mainline branch (main or master)
22
# Set this to the mainline branch you are using
33
trigger:
4-
- main
4+
branches:
5+
include:
6+
- main
7+
paths:
8+
include:
9+
- src/*
10+
- infra/*
11+
- azure.yaml
12+
- azure_custom.yaml
13+
- .azdo/pipelines/azure-dev.yml
14+
exclude:
15+
- '*.md'
16+
- docs/*
17+
- data/*
518

619
# Azure Pipelines workflow to deploy to Azure using azd
720
# To configure required secrets and service connection for connecting to Azure, simply run `azd pipeline config --provider azdo`

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ updates:
3232
- "*"
3333

3434
- package-ecosystem: "pip"
35-
directory: "/src/frontend"
35+
directory: "/src/App"
3636
schedule:
3737
interval: "monthly"
3838
commit-message:
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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+
12+
jobs:
13+
template_validation:
14+
runs-on: ubuntu-latest
15+
name: azd template validation
16+
environment: production
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Set timestamp
21+
run: echo "HHMM=$(date -u +'%H%M')" >> $GITHUB_ENV
22+
23+
- uses: microsoft/template-validation-action@v0.4.3
24+
with:
25+
validateAzd: ${{ vars.TEMPLATE_VALIDATE_AZD }}
26+
validateTests: ${{ vars.TEMPLATE_VALIDATE_TESTS }}
27+
useDevContainer: ${{ vars.TEMPLATE_USE_DEV_CONTAINER }}
28+
id: validation
29+
env:
30+
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
31+
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
32+
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
33+
AZURE_ENV_NAME: azd-${{ vars.AZURE_ENV_NAME }}-${{ env.HHMM }}
34+
AZURE_LOCATION: ${{ vars.AZURE_LOCATION }}
35+
AZURE_ENV_OPENAI_LOCATION : ${{ vars.AZURE_AI_DEPLOYMENT_LOCATION }}
36+
AZURE_ENV_MODEL_CAPACITY: 1
37+
AZURE_ENV_MODEL_4_1_CAPACITY: 1 # keep low to avoid potential quota issues
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
40+
- name: print result
41+
run: cat ${{ steps.validation.outputs.resultFile }}

.github/workflows/azure-dev.yml

Lines changed: 48 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,59 @@
1-
name: Azure Template Validation
1+
name: Azure Dev Deploy
2+
23
on:
34
workflow_dispatch:
45

56
permissions:
67
contents: read
78
id-token: write
8-
pull-requests: write
99

1010
jobs:
11-
template_validation_job:
11+
deploy:
1212
runs-on: ubuntu-latest
1313
environment: production
14-
name: template validation
14+
env:
15+
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
16+
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
17+
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
18+
AZURE_LOCATION: ${{ vars.AZURE_LOCATION }}
19+
AZURE_ENV_OPENAI_LOCATION : ${{ vars.AZURE_AI_DEPLOYMENT_LOCATION }}
20+
AZURE_ENV_MODEL_CAPACITY: 1
21+
AZURE_ENV_MODEL_4_1_CAPACITY: 1
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
AZURE_DEV_COLLECT_TELEMETRY: ${{ vars.AZURE_DEV_COLLECT_TELEMETRY }}
1524
steps:
16-
# Step 1: Checkout the code from your repository
17-
- name: Checkout code
18-
uses: actions/checkout@v4
19-
# Step 2: Validate the Azure template using microsoft/template-validation-action
20-
- name: Validate Azure Template
21-
uses: microsoft/template-validation-action@bae4895d0a8abd4f0d5aad68ae8647b3027f4c91
22-
with:
23-
validateAzd: true
24-
useDevContainer: false
25-
id: validation
26-
env:
27-
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
28-
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
29-
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
30-
AZURE_ENV_NAME: ${{ secrets.AZURE_ENV_NAME }}
31-
AZURE_LOCATION: ${{ secrets.AZURE_LOCATION }}
32-
AZURE_ENV_OPENAI_LOCATION : ${{ secrets.AZURE_AI_DEPLOYMENT_LOCATION }}
33-
AZURE_ENV_MODEL_CAPACITY: 1
34-
AZURE_ENV_MODEL_4_1_CAPACITY: 1
35-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36-
AZURE_DEV_COLLECT_TELEMETRY: ${{ vars.AZURE_DEV_COLLECT_TELEMETRY }}
37-
38-
# Step 3: Print the result of the validation
39-
- name: print result
40-
run: cat ${{ steps.validation.outputs.resultFile }}
25+
- name: Checkout Code
26+
uses: actions/checkout@v4
27+
28+
- name: Set timestamp and env name
29+
run: |
30+
HHMM=$(date -u +'%H%M')
31+
echo "AZURE_ENV_NAME=azd-${{ vars.AZURE_ENV_NAME }}-${HHMM}" >> $GITHUB_ENV
32+
33+
- name: Install azd
34+
uses: Azure/setup-azd@v2
35+
36+
- name: Login to Azure
37+
uses: azure/login@v2
38+
with:
39+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
40+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
41+
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
42+
43+
- name: Login to AZD
44+
shell: bash
45+
run: |
46+
azd auth login \
47+
--client-id "$AZURE_CLIENT_ID" \
48+
--federated-credential-provider "github" \
49+
--tenant-id "$AZURE_TENANT_ID"
50+
51+
- name: Provision and Deploy
52+
shell: bash
53+
run: |
54+
if ! azd env select "$AZURE_ENV_NAME"; then
55+
azd env new "$AZURE_ENV_NAME" --subscription "$AZURE_SUBSCRIPTION_ID" --location "$AZURE_LOCATION" --no-prompt
56+
fi
57+
azd config set defaults.subscription "$AZURE_SUBSCRIPTION_ID"
58+
azd env set AZURE_ENV_OPENAI_LOCATION="$AZURE_ENV_OPENAI_LOCATION"
59+
azd up --no-prompt

.github/workflows/deploy-waf.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ on:
88
push:
99
branches:
1010
- main
11+
paths:
12+
- 'src/**'
13+
- 'infra/**'
14+
- 'azure.yaml'
15+
- 'azure_custom.yaml'
16+
- '.github/workflows/deploy-waf.yml'
1117
schedule:
1218
- cron: "0 11,23 * * *" # Runs at 11:00 AM and 11:00 PM GMT
1319

.github/workflows/docker-build-and-push.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
- demo-v4
99
- hotfix
1010
paths:
11-
- 'src/frontend/**'
11+
- 'src/App/**'
1212
- 'src/backend/**'
1313
- 'src/mcp_server/**'
1414
- '.github/workflows/docker-build-and-push.yml'
@@ -31,7 +31,7 @@ on:
3131
- demo-v4
3232
- hotfix
3333
paths:
34-
- 'src/frontend/**'
34+
- 'src/App/**'
3535
- 'src/backend/**'
3636
- 'src/mcp_server/**'
3737
- '.github/workflows/docker-build-and-push.yml'
@@ -117,8 +117,8 @@ jobs:
117117
- name: Build and optionally push Frontend Docker image
118118
uses: docker/build-push-action@v6
119119
with:
120-
context: ./src/frontend
121-
file: ./src/frontend/Dockerfile
120+
context: ./src/App
121+
file: ./src/App/Dockerfile
122122
push: ${{ env.TAG != 'pullrequest-ignore' }}
123123
tags: |
124124
${{ steps.registry.outputs.ext_registry }}/macaefrontend:${{ env.TAG }}

.github/workflows/job-docker-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ jobs:
7474
env:
7575
DOCKER_BUILD_SUMMARY: false
7676
with:
77-
context: ./src/frontend
78-
file: ./src/frontend/Dockerfile
77+
context: ./src/App
78+
file: ./src/App/Dockerfile
7979
push: true
8080
tags: |
8181
${{ secrets.ACR_TEST_LOGIN_SERVER }}/macaefrontend:${{ steps.generate_docker_tag.outputs.IMAGE_TAG }}
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
name: Validate Bicep Parameters
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
schedule:
8+
- cron: '30 6 * * 3' # Wednesday 12:00 PM IST (6:30 AM UTC)
9+
pull_request:
10+
branches:
11+
- main
12+
- dev
13+
paths:
14+
- 'infra/**/*.bicep'
15+
- 'infra/**/*.parameters.json'
16+
- 'infra/scripts/validate_bicep_params.py'
17+
workflow_dispatch:
18+
19+
env:
20+
accelerator_name: "MACAE"
21+
22+
jobs:
23+
validate:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout Code
27+
uses: actions/checkout@v4
28+
29+
- name: Set up Python
30+
uses: actions/setup-python@v5
31+
with:
32+
python-version: '3.11'
33+
34+
- name: Validate infra/ parameters
35+
id: validate_infra
36+
continue-on-error: true
37+
run: |
38+
set +e
39+
python infra/scripts/validate_bicep_params.py --dir infra --strict --no-color --json-output infra_results.json 2>&1 | tee infra_output.txt
40+
EXIT_CODE=${PIPESTATUS[0]}
41+
set -e
42+
echo "## Infra Param Validation" >> "$GITHUB_STEP_SUMMARY"
43+
echo '```' >> "$GITHUB_STEP_SUMMARY"
44+
cat infra_output.txt >> "$GITHUB_STEP_SUMMARY"
45+
echo '```' >> "$GITHUB_STEP_SUMMARY"
46+
exit $EXIT_CODE
47+
48+
- name: Set overall result
49+
id: result
50+
run: |
51+
if [[ "${{ steps.validate_infra.outcome }}" == "failure" ]]; then
52+
echo "status=failure" >> "$GITHUB_OUTPUT"
53+
else
54+
echo "status=success" >> "$GITHUB_OUTPUT"
55+
fi
56+
57+
- name: Upload validation results
58+
if: always()
59+
uses: actions/upload-artifact@v4
60+
with:
61+
name: bicep-validation-results
62+
path: |
63+
infra_results.json
64+
retention-days: 30
65+
66+
- name: Send schedule notification on failure
67+
if: github.event_name == 'schedule' && steps.result.outputs.status == 'failure'
68+
env:
69+
LOGICAPP_URL: ${{ secrets.EMAILNOTIFICATION_LOGICAPP_URL_TA }}
70+
GITHUB_REPOSITORY: ${{ github.repository }}
71+
GITHUB_RUN_ID: ${{ github.run_id }}
72+
ACCELERATOR_NAME: ${{ env.accelerator_name }}
73+
run: |
74+
RUN_URL="https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
75+
INFRA_OUTPUT=$(sed 's/&/\&amp;/g; s/</\&lt;/g; s/>/\&gt;/g' infra_output.txt)
76+
77+
jq -n \
78+
--arg name "${ACCELERATOR_NAME}" \
79+
--arg infra "$INFRA_OUTPUT" \
80+
--arg url "$RUN_URL" \
81+
'{subject: ("Bicep Parameter Validation Report - " + $name + " - Issues Detected"), body: ("<p>Dear Team,</p><p>The scheduled <strong>Bicep Parameter Validation</strong> for <strong>" + $name + "</strong> has detected parameter mapping errors.</p><p><strong>infra/ Results:</strong></p><pre>" + $infra + "</pre><p><strong>Run URL:</strong> <a href=\"" + $url + "\">" + $url + "</a></p><p>Please fix the parameter mapping issues at your earliest convenience.</p><p>Best regards,<br>Your Automation Team</p>")}' \
82+
| curl -X POST "${LOGICAPP_URL}" \
83+
-H "Content-Type: application/json" \
84+
-d @- || echo "Failed to send notification"
85+
86+
- name: Send schedule notification on success
87+
if: github.event_name == 'schedule' && steps.result.outputs.status == 'success'
88+
env:
89+
LOGICAPP_URL: ${{ secrets.EMAILNOTIFICATION_LOGICAPP_URL_TA }}
90+
GITHUB_REPOSITORY: ${{ github.repository }}
91+
GITHUB_RUN_ID: ${{ github.run_id }}
92+
ACCELERATOR_NAME: ${{ env.accelerator_name }}
93+
run: |
94+
RUN_URL="https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
95+
INFRA_OUTPUT=$(sed 's/&/\&amp;/g; s/</\&lt;/g; s/>/\&gt;/g' infra_output.txt)
96+
97+
jq -n \
98+
--arg name "${ACCELERATOR_NAME}" \
99+
--arg infra "$INFRA_OUTPUT" \
100+
--arg url "$RUN_URL" \
101+
'{subject: ("Bicep Parameter Validation Report - " + $name + " - Passed"), body: ("<p>Dear Team,</p><p>The scheduled <strong>Bicep Parameter Validation</strong> for <strong>" + $name + "</strong> has completed successfully. All parameter mappings are valid.</p><p><strong>infra/ Results:</strong></p><pre>" + $infra + "</pre><p><strong>Run URL:</strong> <a href=\"" + $url + "\">" + $url + "</a></p><p>Best regards,<br>Your Automation Team</p>")}' \
102+
| curl -X POST "${LOGICAPP_URL}" \
103+
-H "Content-Type: application/json" \
104+
-d @- || echo "Failed to send notification"
105+
106+
- name: Fail if errors found
107+
if: steps.result.outputs.status == 'failure'
108+
run: exit 1

Multi-Agent-Custom-Automation-Engine-Solution-Accelerator.code-workspace

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"path": "."
55
},
66
// {
7-
// "path": "./src/frontend"
7+
// "path": "./src/App"
88
// },
99
// {
1010
// "path": "./src/backend"

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ Follow the quick deploy steps on the deployment guide to deploy this solution to
8080

8181
<br/>
8282

83+
> **Note**: Some tenants may have additional security restrictions that run periodically and could impact the application (e.g., blocking public network access). If you experience issues or the application stops working, check if these restrictions are the cause. In such cases, consider deploying the WAF-supported version to ensure compliance. To configure, [Click here](./docs/DeploymentGuide.md#31-choose-deployment-type-optional).
84+
8385
> ⚠️ **Important: Check Azure OpenAI Quota Availability**
8486
<br/>To ensure sufficient quota is available in your subscription, please follow [quota check instructions guide](./docs/quota_check.md) before you deploy the solution.
8587

0 commit comments

Comments
 (0)