Skip to content

Commit bfb037c

Browse files
Merge remote-tracking branch 'origin/dev' into feature/standardize-parameter-names
2 parents 2d20a9f + 657249b commit bfb037c

60 files changed

Lines changed: 7564 additions & 4626 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
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_LOCATION }}
36+
AZURE_ENV_MODEL_CAPACITY: 10 # keep low to avoid potential quota issues
37+
AZURE_ENV_EMBEDDING_MODEL_CAPACITY: 10 # 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: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Azure Dev Deploy
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: read
8+
id-token: write
9+
10+
jobs:
11+
deploy:
12+
runs-on: ubuntu-latest
13+
environment: production
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_ENV_NAME: ${{ vars.AZURE_ENV_NAME }}${{ github.run_number }}
19+
AZURE_LOCATION: ${{ vars.AZURE_LOCATION }}
20+
AZURE_DEV_COLLECT_TELEMETRY: ${{ vars.AZURE_DEV_COLLECT_TELEMETRY }}
21+
steps:
22+
- name: Checkout Code
23+
uses: actions/checkout@v4
24+
25+
- name: Set timestamp and env name
26+
run: |
27+
HHMM=$(date -u +'%H%M')
28+
echo "AZURE_ENV_NAME=azd-${{ vars.AZURE_ENV_NAME }}-${HHMM}" >> $GITHUB_ENV
29+
30+
- name: Install azd
31+
uses: Azure/setup-azd@v2
32+
33+
- name: Login to Azure
34+
uses: azure/login@v2
35+
with:
36+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
37+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
38+
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
39+
40+
- name: Login to AZD
41+
shell: bash
42+
run: |
43+
azd auth login \
44+
--client-id "$AZURE_CLIENT_ID" \
45+
--federated-credential-provider "github" \
46+
--tenant-id "$AZURE_TENANT_ID"
47+
48+
- name: Provision and Deploy
49+
shell: bash
50+
run: |
51+
if ! azd env select "$AZURE_ENV_NAME"; then
52+
azd env new "$AZURE_ENV_NAME" --subscription "$AZURE_SUBSCRIPTION_ID" --location "$AZURE_LOCATION" --no-prompt
53+
fi
54+
azd config set defaults.subscription "$AZURE_SUBSCRIPTION_ID"
55+
azd env set AZURE_ENV_OPENAI_LOCATION="$AZURE_LOCATION"
56+
azd up --no-prompt

.github/workflows/deploy-orchestrator.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,24 @@ jobs:
7676
TEST_SUITE: ${{ inputs.trigger_type == 'workflow_dispatch' && inputs.run_e2e_tests || 'GoldenPath-Testing' }}
7777
secrets: inherit
7878

79-
send-notification:
80-
# if: "!cancelled()"
81-
if: false # Temporarily disable notification job
79+
cleanup-deployment:
80+
if: "!cancelled() && needs.deploy.outputs.RESOURCE_GROUP_NAME != '' && inputs.existing_webapp_url == '' && (inputs.trigger_type != 'workflow_dispatch' || inputs.cleanup_resources)"
8281
needs: [deploy, e2e-test]
82+
uses: ./.github/workflows/job-cleanup-deployment.yml
83+
with:
84+
trigger_type: ${{ inputs.trigger_type }}
85+
cleanup_resources: ${{ inputs.cleanup_resources }}
86+
existing_webapp_url: ${{ inputs.existing_webapp_url }}
87+
RESOURCE_GROUP_NAME: ${{ needs.deploy.outputs.RESOURCE_GROUP_NAME }}
88+
AZURE_LOCATION: ${{ needs.deploy.outputs.AZURE_LOCATION }}
89+
AZURE_ENV_AI_SERVICE_LOCATION: ${{ needs.deploy.outputs.AZURE_ENV_AI_SERVICE_LOCATION }}
90+
ENV_NAME: ${{ needs.deploy.outputs.ENV_NAME }}
91+
IMAGE_TAG: ${{ needs.deploy.outputs.IMAGE_TAG }}
92+
secrets: inherit
93+
94+
send-notification:
95+
if: "!cancelled()"
96+
needs: [deploy, e2e-test, cleanup-deployment]
8397
uses: ./.github/workflows/job-send-notification.yml
8498
with:
8599
trigger_type: ${{ inputs.trigger_type }}
@@ -94,19 +108,5 @@ jobs:
94108
QUOTA_FAILED: ${{ needs.deploy.outputs.QUOTA_FAILED }}
95109
TEST_SUCCESS: ${{ needs.e2e-test.outputs.TEST_SUCCESS }}
96110
TEST_REPORT_URL: ${{ needs.e2e-test.outputs.TEST_REPORT_URL }}
97-
secrets: inherit
98-
99-
cleanup-deployment:
100-
if: "!cancelled() && needs.deploy.outputs.RESOURCE_GROUP_NAME != '' && inputs.existing_webapp_url == '' && (inputs.trigger_type != 'workflow_dispatch' || inputs.cleanup_resources)"
101-
needs: [deploy, e2e-test]
102-
uses: ./.github/workflows/job-cleanup-deployment.yml
103-
with:
104-
trigger_type: ${{ inputs.trigger_type }}
105-
cleanup_resources: ${{ inputs.cleanup_resources }}
106-
existing_webapp_url: ${{ inputs.existing_webapp_url }}
107-
RESOURCE_GROUP_NAME: ${{ needs.deploy.outputs.RESOURCE_GROUP_NAME }}
108-
AZURE_LOCATION: ${{ needs.deploy.outputs.AZURE_LOCATION }}
109-
AZURE_ENV_AI_SERVICE_LOCATION: ${{ needs.deploy.outputs.AZURE_ENV_AI_SERVICE_LOCATION }}
110-
ENV_NAME: ${{ needs.deploy.outputs.ENV_NAME }}
111-
IMAGE_TAG: ${{ needs.deploy.outputs.IMAGE_TAG }}
111+
cleanup_result: ${{ needs.cleanup-deployment.result }}
112112
secrets: inherit

0 commit comments

Comments
 (0)