Skip to content

Commit 91f47b8

Browse files
Merge pull request #602 from microsoft/main
feat: Merge latest changes to demo
2 parents f75c7fb + 6dff950 commit 91f47b8

File tree

103 files changed

+47109
-4301
lines changed

Some content is hidden

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

103 files changed

+47109
-4301
lines changed

.github/ISSUE_TEMPLATE/subtask.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Sub task
3+
about: A sub task
4+
title: ''
5+
labels: subtask
6+
assignees: ''
7+
8+
---
9+
10+
Required by <link to parent issue>
11+
12+
# Description
13+
14+
A clear and concise description of what this subtask is.
15+
16+
# Tasks
17+
18+
_To be filled in by the engineer picking up the subtask
19+
20+
- [ ] Task 1
21+
- [ ] Task 2
22+
- [ ] ...

.github/workflows/Scheduled-Dependabot-PRs-Auto-Merge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
runs-on: ubuntu-latest
3737
steps:
3838
- name: Checkout repository
39-
uses: actions/checkout@v4
39+
uses: actions/checkout@v5
4040

4141
- name: Install GitHub CLI
4242
run: |

.github/workflows/azure-dev.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ jobs:
1515
steps:
1616
# Step 1: Checkout the code from your repository
1717
- name: Checkout code
18-
uses: actions/checkout@v4
18+
uses: actions/checkout@v5
1919

2020
# Step 2: Validate the Azure template using microsoft/template-validation-action
2121
- name: Validate Azure Template
22-
uses: microsoft/template-validation-action@v0.3.5
22+
uses: microsoft/template-validation-action@v0.4.3
2323
id: validation
2424
env:
2525
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
@@ -28,6 +28,7 @@ jobs:
2828
AZURE_ENV_NAME: ${{ secrets.AZURE_ENV_NAME }}
2929
AZURE_LOCATION: ${{ secrets.AZURE_LOCATION }}
3030
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
AZURE_DEV_COLLECT_TELEMETRY: ${{ vars.AZURE_DEV_COLLECT_TELEMETRY }}
3132

3233
# Step 3: Print the result of the validation
3334
- name: Print result
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Broken Link Checker
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '**/*.md'
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
markdown-link-check:
14+
name: Check Markdown Broken Links
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout Repo
19+
uses: actions/checkout@v5
20+
with:
21+
fetch-depth: 0
22+
23+
# For PR : Get only changed markdown files
24+
- name: Get changed markdown files (PR only)
25+
id: changed-markdown-files
26+
if: github.event_name == 'pull_request'
27+
uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 # v46
28+
with:
29+
files: |
30+
**/*.md
31+
32+
33+
# For PR: Check broken links only in changed files
34+
- name: Check Broken Links in Changed Markdown Files
35+
id: lychee-check-pr
36+
if: github.event_name == 'pull_request' && steps.changed-markdown-files.outputs.any_changed == 'true'
37+
uses: lycheeverse/[email protected]
38+
with:
39+
args: >
40+
--verbose --no-progress --exclude ^https?://
41+
${{ steps.changed-markdown-files.outputs.all_changed_files }}
42+
failIfEmpty: false
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
46+
# For manual trigger: Check all markdown files in repo
47+
- name: Check Broken Links in All Markdown Files in Entire Repo (Manual Trigger)
48+
id: lychee-check-manual
49+
if: github.event_name == 'workflow_dispatch'
50+
uses: lycheeverse/[email protected]
51+
with:
52+
args: >
53+
--verbose --no-progress --exclude ^https?://
54+
'**/*.md'
55+
failIfEmpty: false
56+
env:
57+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/create-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout
17-
uses: actions/checkout@v4
17+
uses: actions/checkout@v5
1818
with:
1919
ref: ${{ github.event.workflow_run.head_sha }}
2020

21-
- uses: codfish/semantic-release-action@v3
21+
- uses: codfish/semantic-release-action@v4
2222
id: semantic
2323
with:
2424
tag-format: 'v${version}'

.github/workflows/deploy.yml

Lines changed: 50 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
11
name: DocGen Deploy-Test-Cleanup Pipeline
22

33
on:
4-
workflow_run:
5-
workflows: ["Build Docker and Optional Push"]
6-
types:
7-
- completed
8-
branches:
9-
- main
10-
- dev
11-
- demo
12-
13-
schedule:
14-
- cron: '0 9,21 * * *' # Runs at 9:00 AM and 9:00 PM GMT
4+
pull_request:
5+
branches:
6+
- main
7+
workflow_run:
8+
workflows: ["Build Docker and Optional Push"]
9+
types:
10+
- completed
11+
branches:
12+
- main
13+
- dev
14+
- demo
15+
16+
schedule:
17+
- cron: '0 9,21 * * *' # Runs at 9:00 AM and 9:00 PM GMT
1518

1619
env:
17-
GPT_MIN_CAPACITY: 250
18-
TEXT_EMBEDDING_MIN_CAPACITY: 40
19-
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
20+
GPT_MIN_CAPACITY: 150
21+
TEXT_EMBEDDING_MIN_CAPACITY: 80
22+
BRANCH_NAME: ${{ github.event.workflow_run.head_branch || github.head_ref || github.ref_name }}
2023

2124
jobs:
2225
deploy:
@@ -26,7 +29,7 @@ jobs:
2629
WEBAPP_URL: ${{ steps.get_output.outputs.WEBAPP_URL }}
2730
steps:
2831
- name: Checkout Code
29-
uses: actions/checkout@v3
32+
uses: actions/checkout@v5
3033

3134
- name: Setup Azure CLI
3235
run: |
@@ -83,7 +86,11 @@ jobs:
8386
- name: Set Deployment Region
8487
run: |
8588
echo "Selected Region: $VALID_REGION"
89+
echo "AZURE_AI_LOCATION=$VALID_REGION" >> $GITHUB_ENV
8690
echo "AZURE_LOCATION=$VALID_REGION" >> $GITHUB_ENV
91+
if [ "$VALID_REGION" == "eastus" ] || [ "$VALID_REGION" == "westus3" ]; then
92+
echo "AZURE_LOCATION=uksouth" >> $GITHUB_ENV
93+
fi
8794
8895
- name: Generate Resource Group Name
8996
id: generate_rg_name
@@ -126,29 +133,32 @@ jobs:
126133
set -e
127134
# set image tag based on branch
128135
if [[ "${{ env.BRANCH_NAME }}" == "main" ]]; then
129-
IMAGE_TAG="latest"
136+
IMAGE_TAG="latest_waf"
130137
elif [[ "${{ env.BRANCH_NAME }}" == "dev" ]]; then
131138
IMAGE_TAG="dev"
132139
elif [[ "${{ env.BRANCH_NAME }}" == "demo" ]]; then
133140
IMAGE_TAG="demo"
134141
else
135-
IMAGE_TAG="latest"
142+
IMAGE_TAG="latest_waf"
136143
fi
137144
145+
# Generate current timestamp in desired format: YYYY-MM-DDTHH:MM:SS.SSSSSSSZ
146+
current_date=$(date -u +"%Y-%m-%dT%H:%M:%S.%7NZ")
147+
138148
az deployment group create \
139149
--name ${{ env.SOLUTION_PREFIX }}-deployment \
140150
--resource-group ${{ env.RESOURCE_GROUP_NAME }} \
141-
--template-file infra/main.json \
151+
--template-file infra/main.bicep \
142152
--parameters \
143-
environmentName="${{ env.SOLUTION_PREFIX }}" \
144-
secondaryLocation="northcentralus" \
145-
deploymentType="GlobalStandard" \
146-
gptModelName="gpt-4.1" \
147-
azureOpenaiAPIVersion="2024-05-01-preview" \
148-
gptDeploymentCapacity=${{ env.GPT_MIN_CAPACITY }} \
149-
embeddingModel="text-embedding-ada-002" \
153+
solutionName="${{ env.SOLUTION_PREFIX }}" \
154+
secondaryLocation="${{ env.AZURE_LOCATION }}" \
155+
location="${{ env.AZURE_LOCATION }}" \
156+
gptModelCapacity=${{ env.GPT_MIN_CAPACITY }} \
150157
embeddingDeploymentCapacity=${{ env.TEXT_EMBEDDING_MIN_CAPACITY }} \
151-
imageTag="${IMAGE_TAG}"
158+
azureAiServiceLocation=${{ env.AZURE_AI_LOCATION }} \
159+
imageTag="${IMAGE_TAG}"\
160+
createdBy="Pipeline" \
161+
tags="{'SecurityControl':'Ignore','Purpose':'Deploying and Cleaning Up Resources for Validation','CreatedDate':'$current_date'}"
152162
153163
- name: Get Deployment Output and extract Values
154164
id: get_output
@@ -167,22 +177,31 @@ jobs:
167177
echo "KEY_VAULT_NAME=$KEY_VAULT_NAME" >> $GITHUB_ENV
168178
COSMOSDB_ACCOUNT_NAME=$(echo $BICEP_OUTPUT | jq -r '.cosmosdB_ACCOUNT_NAME.value')
169179
echo "COSMOSDB_ACCOUNT_NAME=$COSMOSDB_ACCOUNT_NAME" >> $GITHUB_ENV
180+
AI_FOUNDRY_RESOURCE_ID=$(echo $BICEP_OUTPUT | jq -r '.aI_FOUNDRY_RESOURCE_ID.value')
181+
echo "AI_FOUNDRY_RESOURCE_ID=$AI_FOUNDRY_RESOURCE_ID" >> $GITHUB_ENV
182+
AI_SEARCH_SERVICE_NAME=$(echo $BICEP_OUTPUT | jq -r '.aI_SEARCH_SERVICE_NAME.value')
183+
echo "AI_SEARCH_SERVICE_NAME=$AI_SEARCH_SERVICE_NAME" >> $GITHUB_ENV
170184
echo "Deployment output: $BICEP_OUTPUT"
171185
172186
- name: Run Post-Deployment Script
173187
id: post_deploy
188+
env:
189+
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
174190
run: |
175191
set -e
176192
az account set --subscription "${{ secrets.AZURE_SUBSCRIPTION_ID }}"
177193
178194
echo "Running post-deployment script..."
179-
bash ./infra/scripts/copy_kb_files.sh \
195+
196+
bash ./infra/scripts/process_sample_data.sh \
180197
"${{ env.STORAGE_ACCOUNT_NAME }}" \
181198
"${{ env.STORAGE_CONTAINER_NAME }}" \
182-
"${{ secrets.AZURE_CLIENT_ID }}"
183-
bash ./infra/scripts/run_create_index_scripts.sh \
184199
"${{ env.KEY_VAULT_NAME }}" \
185-
"${{ secrets.AZURE_CLIENT_ID }}"
200+
"${{ env.COSMOSDB_ACCOUNT_NAME }}" \
201+
"${{ env.RESOURCE_GROUP_NAME }}" \
202+
"${{ env.AI_SEARCH_SERVICE_NAME }}" \
203+
"${{ secrets.AZURE_CLIENT_ID }}" \
204+
"${{ env.AI_FOUNDRY_RESOURCE_ID }}"
186205
187206
- name: Logout from Azure
188207
if: always()
@@ -395,4 +414,4 @@ jobs:
395414
if: always()
396415
run: |
397416
az logout
398-
echo "Logged out from Azure."
417+
echo "Logged out from Azure."

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ jobs:
1919

2020
steps:
2121
- name: Checkout repository
22-
uses: actions/checkout@v2
22+
uses: actions/checkout@v5
2323

2424
- name: Set up Docker Buildx
25-
uses: docker/setup-buildx-action@v1
25+
uses: docker/setup-buildx-action@v3
2626

2727
- name: Log in to Azure Container Registry - External Registry
2828
if: ${{ github.ref_name == 'main' }}
@@ -58,7 +58,7 @@ jobs:
5858
id: determine_tag
5959
run: |
6060
if [[ "${{ github.ref_name }}" == "main" ]]; then
61-
echo "tagname=latest" >> $GITHUB_OUTPUT
61+
echo "tagname=latest_waf" >> $GITHUB_OUTPUT
6262
elif [[ "${{ github.ref_name }}" == "dev" ]]; then
6363
echo "tagname=dev" >> $GITHUB_OUTPUT
6464
elif [[ "${{ github.ref_name }}" == "demo" ]]; then

.github/workflows/node.js.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ jobs:
2222
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
2323

2424
steps:
25-
- uses: actions/checkout@v3
25+
- uses: actions/checkout@v5
2626
- name: Use Node.js ${{ matrix.node-version }}
27-
uses: actions/setup-node@v3
27+
uses: actions/setup-node@v5
2828
with:
2929
node-version: ${{ matrix.node-version }}
3030
cache: 'npm'

.github/workflows/pr-title-checker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ jobs:
1717
runs-on: ubuntu-latest
1818
if: ${{ github.event_name != 'merge_group' }}
1919
steps:
20-
- uses: amannn/action-semantic-pull-request@v5
20+
- uses: amannn/action-semantic-pull-request@v6
2121
env:
2222
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/pylint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ jobs:
1212
steps:
1313
# Step 1: Checkout code
1414
- name: Checkout code
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@v5
1616

1717
# Step 2: Set up Python environment
1818
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v3
19+
uses: actions/setup-python@v6
2020
with:
2121
python-version: ${{ matrix.python-version }}
2222

@@ -29,5 +29,5 @@ jobs:
2929
- name: Pylint
3030
run: |
3131
echo "Running Pylint..."
32-
python -m flake8 --config=.flake8 --verbose .
32+
python -m flake8 --config=.flake8 --exclude=tests --verbose .
3333

0 commit comments

Comments
 (0)