Skip to content

Commit 9bc1fce

Browse files
2 parents 7f95f39 + b6cd0d2 commit 9bc1fce

103 files changed

Lines changed: 162094 additions & 4758 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-orchestrator.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,8 @@ env:
7272

7373
jobs:
7474
docker-build:
75+
if: inputs.trigger_type == 'workflow_dispatch' && inputs.build_docker_image == true
7576
uses: ./.github/workflows/job-docker-build.yml
76-
with:
77-
trigger_type: ${{ inputs.trigger_type }}
78-
build_docker_image: ${{ inputs.build_docker_image }}
7977
secrets: inherit
8078

8179
deploy:

.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: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717
- cron: "0 11,23 * * *" # Runs at 11:00 AM and 11:00 PM GMT
1818
workflow_dispatch: #Allow manual triggering
1919
env:
20-
GPT_MIN_CAPACITY: 150
20+
GPT_MIN_CAPACITY: 50
2121
O4_MINI_MIN_CAPACITY: 50
2222
GPT41_MINI_MIN_CAPACITY: 50
2323
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
@@ -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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ jobs:
269269
azd env set AZURE_ENV_IMAGE_TAG="$INPUT_IMAGE_TAG"
270270
271271
if [[ "$INPUT_BUILD_DOCKER_IMAGE" == "true" ]]; then
272-
ACR_NAME=$(echo "${{ secrets.ACR_TEST_LOGIN_SERVER }}")
272+
ACR_NAME=$(echo "${{ vars.ACR_TEST_LOGIN_SERVER }}")
273273
azd env set AZURE_ENV_CONTAINER_REGISTRY_ENDPOINT="$ACR_NAME"
274274
echo "Set ACR name to: $ACR_NAME"
275275
else
@@ -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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ jobs:
271271
272272
# Set ACR name only when building Docker image
273273
if ($env:INPUT_BUILD_DOCKER_IMAGE -eq "true") {
274-
$ACR_NAME = "${{ secrets.ACR_TEST_LOGIN_SERVER }}"
274+
$ACR_NAME = "${{ vars.ACR_TEST_LOGIN_SERVER }}"
275275
azd env set AZURE_ENV_CONTAINER_REGISTRY_ENDPOINT="$ACR_NAME"
276276
Write-Host "Set ACR name to: $ACR_NAME"
277277
} else {
@@ -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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ on:
9898
value: ${{ jobs.azure-setup.outputs.QUOTA_FAILED }}
9999

100100
env:
101-
GPT_MIN_CAPACITY: 150
101+
GPT_MIN_CAPACITY: 50
102102
O4_MINI_MIN_CAPACITY: 50
103103
GPT41_MINI_MIN_CAPACITY: 50
104104
BRANCH_NAME: ${{ github.event.workflow_run.head_branch || github.head_ref || github.ref_name }}
@@ -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/job-docker-build.yml

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,21 @@
1-
name: Docker Build Job
1+
name: Build & Push Test Images (Feature Branch)
22
on:
33
workflow_call:
4-
inputs:
5-
trigger_type:
6-
description: 'Trigger type (workflow_dispatch, pull_request, schedule)'
7-
required: true
8-
type: string
9-
build_docker_image:
10-
description: 'Build And Push Docker Image (Optional)'
11-
required: false
12-
default: false
13-
type: boolean
144
outputs:
155
IMAGE_TAG:
166
description: "Generated Docker Image Tag"
177
value: ${{ jobs.docker-build.outputs.IMAGE_TAG }}
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
id-token: write
1813

1914
env:
2015
BRANCH_NAME: ${{ github.event.workflow_run.head_branch || github.head_ref || github.ref_name }}
2116

2217
jobs:
2318
docker-build:
24-
if: inputs.trigger_type == 'workflow_dispatch' && inputs.build_docker_image == true
2519
runs-on: ubuntu-latest
2620
environment: production
2721
outputs:
@@ -55,7 +49,11 @@ jobs:
5549
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
5650

5751
- name: Log in to Azure Container Registry
58-
run: az acr login --name ${{ secrets.ACR_TEST_LOGIN_SERVER }}
52+
shell: bash
53+
run: |
54+
# Extract registry name from login server (e.g., myacr.azurecr.io -> myacr)
55+
ACR_NAME=$(echo "${{ vars.ACR_TEST_LOGIN_SERVER }}" | cut -d'.' -f1)
56+
az acr login --name "$ACR_NAME"
5957
6058
- name: Build and optionally push Backend Docker image
6159
uses: docker/build-push-action@v7
@@ -66,8 +64,8 @@ jobs:
6664
file: ./src/backend/Dockerfile
6765
push: true
6866
tags: |
69-
${{ secrets.ACR_TEST_LOGIN_SERVER }}/macaebackend:${{ steps.generate_docker_tag.outputs.IMAGE_TAG }}
70-
${{ secrets.ACR_TEST_LOGIN_SERVER }}/macaebackend:${{ steps.generate_docker_tag.outputs.IMAGE_TAG }}_${{ github.run_number }}
67+
${{ vars.ACR_TEST_LOGIN_SERVER }}/macaebackend:${{ steps.generate_docker_tag.outputs.IMAGE_TAG }}
68+
${{ vars.ACR_TEST_LOGIN_SERVER }}/macaebackend:${{ steps.generate_docker_tag.outputs.IMAGE_TAG }}_${{ github.run_number }}
7169
7270
- name: Build and optionally push Frontend Docker image
7371
uses: docker/build-push-action@v7
@@ -78,8 +76,8 @@ jobs:
7876
file: ./src/App/Dockerfile
7977
push: true
8078
tags: |
81-
${{ secrets.ACR_TEST_LOGIN_SERVER }}/macaefrontend:${{ steps.generate_docker_tag.outputs.IMAGE_TAG }}
82-
${{ secrets.ACR_TEST_LOGIN_SERVER }}/macaefrontend:${{ steps.generate_docker_tag.outputs.IMAGE_TAG }}_${{ github.run_number }}
79+
${{ vars.ACR_TEST_LOGIN_SERVER }}/macaefrontend:${{ steps.generate_docker_tag.outputs.IMAGE_TAG }}
80+
${{ vars.ACR_TEST_LOGIN_SERVER }}/macaefrontend:${{ steps.generate_docker_tag.outputs.IMAGE_TAG }}_${{ github.run_number }}
8381
- name: Build and optionally push MCP Docker image
8482
uses: docker/build-push-action@v7
8583
env:
@@ -89,8 +87,8 @@ jobs:
8987
file: ./src/mcp_server/Dockerfile
9088
push: true
9189
tags: |
92-
${{ secrets.ACR_TEST_LOGIN_SERVER }}/macaemcp:${{ steps.generate_docker_tag.outputs.IMAGE_TAG }}
93-
${{ secrets.ACR_TEST_LOGIN_SERVER }}/macaemcp:${{ steps.generate_docker_tag.outputs.IMAGE_TAG }}_${{ github.run_number }}
90+
${{ vars.ACR_TEST_LOGIN_SERVER }}/macaemcp:${{ steps.generate_docker_tag.outputs.IMAGE_TAG }}
91+
${{ vars.ACR_TEST_LOGIN_SERVER }}/macaemcp:${{ steps.generate_docker_tag.outputs.IMAGE_TAG }}_${{ github.run_number }}
9492
- name: Verify Docker Image Build
9593
shell: bash
9694
run: |
@@ -101,7 +99,7 @@ jobs:
10199
if: always()
102100
shell: bash
103101
run: |
104-
ACR_NAME=$(echo "${{ secrets.ACR_TEST_LOGIN_SERVER }}")
102+
ACR_NAME=$(echo "${{ vars.ACR_TEST_LOGIN_SERVER }}")
105103
echo "## 🐳 Docker Build Job Summary" >> $GITHUB_STEP_SUMMARY
106104
echo "" >> $GITHUB_STEP_SUMMARY
107105
echo "| Field | Value |" >> $GITHUB_STEP_SUMMARY

.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/

0 commit comments

Comments
 (0)