Skip to content

Commit a98ac5d

Browse files
Merge pull request microsoft#1029 from Harsh-Microsoft/psl-hb-infrachanges
refactor: restructuring infra
2 parents f2adf7b + 2595f59 commit a98ac5d

98 files changed

Lines changed: 161447 additions & 4709 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.

.github/agents/speckit.contentpack.agent.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ referenced in the KB registration.
153153

154154
### Step 3 — Register the Knowledge Base
155155

156-
Add an entry to `infra/scripts/seed_knowledge_bases.py` in the `KNOWLEDGE_BASES`
156+
Add an entry to `infra/scripts/post-provision/seed_knowledge_bases.py` in the `KNOWLEDGE_BASES`
157157
dict. Place it before the `# ── Example Pack ──` comment block:
158158

159159
```python
@@ -203,7 +203,7 @@ and **never hallucinate data**.
203203

204204
## Registering in the Deployment Script
205205

206-
Edit `infra/scripts/Selecting-Team-Config-And-Data.ps1`. Search for `NEW CONTENT PACK`
206+
Edit `infra/scripts/post-provision/Selecting-Team-Config-And-Data.ps1`. Search for `NEW CONTENT PACK`
207207
— each insertion point has a comment template. There are **4 things** to do:
208208

209209
| # | What | Where |
@@ -245,7 +245,7 @@ After adding your entry, update `$allOption` to `N + 1` so "All" is always last.
245245
azd up
246246

247247
# 2. Provision pack resources — select your pack or "All"
248-
./infra/scripts/Selecting-Team-Config-And-Data.ps1 -ResourceGroup <rg>
248+
./infra/scripts/post-provision/Selecting-Team-Config-And-Data.ps1 -ResourceGroup <rg>
249249
```
250250

251251
---

.github/workflows/deploy-waf.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ jobs:
4545
GPT41_MINI_MIN_CAPACITY: ${{ env.GPT41_MINI_MIN_CAPACITY }}
4646
AZURE_REGIONS: ${{ vars.AZURE_REGIONS }}
4747
run: |
48-
chmod +x infra/scripts/checkquota.sh
49-
if ! infra/scripts/checkquota.sh; then
48+
chmod +x infra/scripts/pre-provision/checkquota.sh
49+
if ! infra/scripts/pre-provision/checkquota.sh; then
5050
# If quota check fails due to insufficient quota, set the flag
51-
if grep -q "No region with sufficient quota found" infra/scripts/checkquota.sh; then
51+
if grep -q "No region with sufficient quota found" infra/scripts/pre-provision/checkquota.sh; then
5252
echo "QUOTA_FAILED=true" >> $GITHUB_ENV
5353
fi
5454
exit 1 # Fail the pipeline if any other failure occurs

.github/workflows/deploy.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ jobs:
5252
GPT41_MINI_MIN_CAPACITY: ${{ env.GPT41_MINI_MIN_CAPACITY }}
5353
AZURE_REGIONS: ${{ vars.AZURE_REGIONS }}
5454
run: |
55-
chmod +x infra/scripts/checkquota.sh
56-
if ! infra/scripts/checkquota.sh; then
55+
chmod +x infra/scripts/pre-provision/checkquota.sh
56+
if ! infra/scripts/pre-provision/checkquota.sh; then
5757
# If quota check fails due to insufficient quota, set the flag
58-
if grep -q "No region with sufficient quota found" infra/scripts/checkquota.sh; then
58+
if grep -q "No region with sufficient quota found" infra/scripts/pre-provision/checkquota.sh; then
5959
echo "QUOTA_FAILED=true" >> $GITHUB_ENV
6060
fi
6161
exit 1 # Fail the pipeline if any other failure occurs
@@ -194,7 +194,7 @@ jobs:
194194
195195
# Run PowerShell script with 'All' use case automatically selected
196196
# Provide two inputs: '1' for keeping current subscription, '5' for All use cases
197-
echo -e "1\n5" | pwsh -File infra/scripts/Selecting-Team-Config-And-Data.ps1 -ResourceGroup "${{ env.RESOURCE_GROUP_NAME }}"
197+
echo -e "1\n5" | pwsh -File infra/scripts/post-provision/Selecting-Team-Config-And-Data.ps1 -ResourceGroup "${{ env.RESOURCE_GROUP_NAME }}"
198198
199199
echo "=== Post-Deployment Script Completed Successfully ==="
200200

.github/workflows/job-deploy-linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ jobs:
360360
361361
# Upload team configurations and index sample data in one step
362362
# Automatically select "6" (All use cases) for non-interactive deployment
363-
echo "6" | bash infra/scripts/selecting_team_config_and_data.sh
363+
echo "6" | bash infra/scripts/post-provision/selecting_team_config_and_data.sh
364364
365365
- name: Generate Deployment Summary
366366
if: always()

.github/workflows/job-deploy-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ jobs:
365365
366366
# Upload team configurations and index sample data in one step
367367
# Automatically select "6" (All use cases) for non-interactive deployment
368-
echo "6" | bash infra/scripts/selecting_team_config_and_data.sh
368+
echo "6" | bash infra/scripts/post-provision/selecting_team_config_and_data.sh
369369
370370
- name: Generate Deployment Summary
371371
if: always()

.github/workflows/job-deploy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,10 +311,10 @@ jobs:
311311
GPT41_MINI_MIN_CAPACITY: ${{ env.GPT41_MINI_MIN_CAPACITY }}
312312
AZURE_REGIONS: ${{ vars.AZURE_REGIONS }}
313313
run: |
314-
chmod +x infra/scripts/checkquota.sh
315-
if ! infra/scripts/checkquota.sh; then
314+
chmod +x infra/scripts/pre-provision/checkquota.sh
315+
if ! infra/scripts/pre-provision/checkquota.sh; then
316316
# If quota check fails due to insufficient quota, set the flag
317-
if grep -q "No region with sufficient quota found" infra/scripts/checkquota.sh; then
317+
if grep -q "No region with sufficient quota found" infra/scripts/pre-provision/checkquota.sh; then
318318
echo "QUOTA_FAILED=true" >> $GITHUB_ENV
319319
fi
320320
exit 1 # Fail the pipeline if any other failure occurs

.github/workflows/validate-bicep-params.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
paths:
1414
- 'infra/**/*.bicep'
1515
- 'infra/**/*.parameters.json'
16-
- 'infra/scripts/validate_bicep_params.py'
16+
- 'infra/scripts/pre-provision/validate_bicep_params.py'
1717
workflow_dispatch:
1818

1919
env:
@@ -39,7 +39,7 @@ jobs:
3939
run: |
4040
set +e
4141
RUN_URL="https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
42-
python infra/scripts/validate_bicep_params.py --dir infra --strict --no-color \
42+
python infra/scripts/pre-provision/validate_bicep_params.py --dir infra --strict --no-color \
4343
--json-output infra_results.json \
4444
--html-output email_body.html \
4545
--accelerator-name "${ACCELERATOR_NAME}" \

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ appsettings.json
1717
# Distribution / packaging
1818
.Python
1919
build/
20+
!infra/scripts/build/
21+
!infra/scripts/build/**
2022
develop-eggs/
2123
dist/
2224
downloads/

azure.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ hooks:
1919
2020
Write-Host " Upload Team Configurations, index sample data and create the Knowledge base from content Packs" -ForegroundColor White
2121
Write-Host " 👉 Run the following command in Bash:" -ForegroundColor White
22-
Write-Host " bash infra/scripts/post_deploy.sh" -ForegroundColor Cyan
22+
Write-Host " bash infra/scripts/post-provision/post_deploy.sh" -ForegroundColor Cyan
2323
Write-Host ""
2424
2525
Write-Host "🌐 Access your deployed Frontend application at:" -ForegroundColor Green
@@ -35,7 +35,7 @@ hooks:
3535
3636
Write-Host " Upload Team Configurations, index sample data and create the Knowledge base from content Packs" -ForegroundColor White
3737
Write-Host " 👉 Run the following command in PowerShell:" -ForegroundColor White
38-
Write-Host " infra\scripts\post_deploy.ps1" -ForegroundColor Cyan
38+
Write-Host " infra\scripts\post-provision\post_deploy.ps1" -ForegroundColor Cyan
3939
Write-Host ""
4040
4141
Write-Host "🌐 Access your deployed Frontend application at:" -ForegroundColor Green
@@ -60,7 +60,7 @@ hooks:
6060
6161
printf "Upload Team Configurations, index sample data and create the Knowledge base from content Packs:\n"
6262
printf " 👉 Run the following command in Bash:\n"
63-
printf " ${Blue}bash infra/scripts/post_deploy.sh${NC}\n\n"
63+
printf " ${Blue}bash infra/scripts/post-provision/post_deploy.sh${NC}\n\n"
6464
6565
printf "🌐 Access your deployed Frontend application at:\n"
6666
printf " ${Blue}https://%s${NC}\n\n" "$webSiteDefaultHostname"

azure_custom.yaml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ services:
3434
prepackage:
3535
windows:
3636
shell: pwsh
37-
run: ../../infra/scripts/package_frontend.ps1
37+
run: ../../infra/scripts/build/package_frontend.ps1
3838
interactive: true
3939
continueOnError: false
4040
posix:
4141
shell: sh
42-
run: bash ../../infra/scripts/package_frontend.sh
42+
run: bash ../../infra/scripts/build/package_frontend.sh
4343
interactive: true
4444
continueOnError: false
4545

@@ -56,9 +56,9 @@ hooks:
5656
Write-Host "===============================================================" -ForegroundColor Yellow
5757
Write-Host ""
5858
59-
Write-Host " Upload Team Configurations and index sample data" -ForegroundColor White
59+
Write-Host " Upload Team Configurations, index sample data and create the Knowledge base from content Packs" -ForegroundColor White
6060
Write-Host " 👉 Run the following command in Bash:" -ForegroundColor White
61-
Write-Host " bash infra/scripts/selecting_team_config_and_data.sh" -ForegroundColor Cyan
61+
Write-Host " bash infra/scripts/post-provision/post_deploy.sh" -ForegroundColor Cyan
6262
Write-Host ""
6363
6464
Write-Host "🌐 Access your deployed Frontend application at:" -ForegroundColor Green
@@ -72,9 +72,9 @@ hooks:
7272
Write-Host "===============================================================" -ForegroundColor Yellow
7373
Write-Host ""
7474
75-
Write-Host " Upload Team Configurations and index sample data" -ForegroundColor White
75+
Write-Host " Upload Team Configurations, index sample data and create the Knowledge base from content Packs" -ForegroundColor White
7676
Write-Host " 👉 Run the following command in PowerShell:" -ForegroundColor White
77-
Write-Host " infra\scripts\Selecting-Team-Config-And-Data.ps1" -ForegroundColor Cyan
77+
Write-Host " infra\scripts\post-provision\post_deploy.ps1" -ForegroundColor Cyan
7878
Write-Host ""
7979
8080
Write-Host "🌐 Access your deployed Frontend application at:" -ForegroundColor Green
@@ -97,11 +97,12 @@ hooks:
9797
printf "${Green} POST-DEPLOYMENT STEPS (Bash)\n"
9898
printf "${Yellow}===============================================================${NC}\n\n"
9999
100-
printf "Upload Team Configurations and index sample data:\n"
100+
printf "Upload Team Configurations, index sample data and create the Knowledge base from content Packs:\n"
101101
printf " 👉 Run the following command in Bash:\n"
102-
printf " ${Blue}bash infra/scripts/selecting_team_config_and_data.sh${NC}\n\n"
102+
printf " ${Blue}bash infra/scripts/post-provision/post_deploy.sh${NC}\n\n"
103103
104104
printf "🌐 Access your deployed Frontend application at:\n"
105105
printf " ${Blue}https://%s${NC}\n\n" "$webSiteDefaultHostname"
106+
106107
shell: sh
107108
interactive: true

0 commit comments

Comments
 (0)