Skip to content

Commit 4bf7bd6

Browse files
feat: Dev to Main merge with folder restructure, image-1-mini
2 parents 06d7cda + 4e8f906 commit 4bf7bd6

File tree

509 files changed

+3501
-101352
lines changed

Some content is hidden

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

509 files changed

+3501
-101352
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ USE_FOUNDRY=false
1616
# Format: https://<project-name>.services.ai.azure.com
1717
AZURE_AI_PROJECT_ENDPOINT=
1818

19-
# Image model deployment name in Foundry (e.g., gpt-image-1)
20-
AZURE_AI_IMAGE_DEPLOYMENT=gpt-image-1
19+
# Image model deployment name in Foundry (e.g., gpt-image-1-mini)
20+
AZURE_AI_IMAGE_DEPLOYMENT=gpt-image-1-mini
2121

2222
# =============================================================================
2323
# Azure OpenAI Configuration
@@ -31,14 +31,14 @@ AZURE_OPENAI_ENDPOINT=https://your-openai.openai.azure.com/
3131
AZURE_OPENAI_GPT_MODEL=gpt-5.1
3232

3333
# Image Generation Model Configuration
34-
# Supported models: gpt-image-1 or gpt-image-1.5
35-
AZURE_OPENAI_IMAGE_MODEL=gpt-image-1
34+
# Supported models: gpt-image-1-mini or gpt-image-1.5
35+
AZURE_OPENAI_IMAGE_MODEL=gpt-image-1-mini
3636

37-
# For gpt-image-1 or gpt-image-1.5, the endpoint is the same as the main OpenAI endpoint, but you can specify a different one if needed
37+
# For gpt-image-1-mini or gpt-image-1.5, the endpoint is the same as the main OpenAI endpoint, but you can specify a different one if needed
3838
AZURE_OPENAI_GPT_IMAGE_ENDPOINT=https://your-openai.openai.azure.com
3939

4040
# Image generation settings
41-
# For gpt-image-1/1.5: sizes are 1024x1024, 1536x1024, 1024x1536, auto; quality is low, medium, high, auto
41+
# For gpt-image-1-mini/1.5: sizes are 1024x1024, 1536x1024, 1024x1536, auto; quality is low, medium, high, auto
4242
AZURE_OPENAI_IMAGE_SIZE=1024x1024
4343
AZURE_OPENAI_IMAGE_QUALITY=medium
4444

.github/dependabot.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ updates:
1818
# Python (pip) dependencies - grouped
1919
- package-ecosystem: "pip"
2020
directories:
21-
- "/content-gen/src/backend"
22-
- "/content-gen/infra/vscode_web"
23-
- "/content-gen/scripts"
21+
- "/src/backend"
22+
- "/infra/vscode_web"
23+
- "/scripts"
2424
schedule:
2525
interval: "monthly"
2626
target-branch: "dependabotchanges"
@@ -35,8 +35,8 @@ updates:
3535
# npm dependencies - grouped
3636
- package-ecosystem: "npm"
3737
directories:
38-
- "/content-gen/src/app/frontend"
39-
- "/content-gen/src/app/frontend-server"
38+
- "/src/app/frontend"
39+
- "/src/app/frontend-server"
4040
schedule:
4141
interval: "monthly"
4242
target-branch: "dependabotchanges"

.github/workflows/azure-dev.yml

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,52 @@
11
name: Azure Template Validation
22
on:
33
workflow_dispatch:
4-
4+
push:
5+
branches:
6+
- main
7+
58
permissions:
69
contents: read
710
id-token: write
811
pull-requests: write
9-
12+
1013
jobs:
1114
template_validation_job:
1215
runs-on: ubuntu-latest
16+
environment: production
1317
name: Template validation
14-
18+
1519
steps:
1620
# Step 1: Checkout the code from your repository
1721
- name: Checkout code
1822
uses: actions/checkout@v4
1923

20-
# Step 2: Validate the Azure template using microsoft/template-validation-action
24+
# Step 2: Pre-authenticate Azure for azd validation
25+
- name: Login to Azure
26+
shell: bash
27+
run: |
28+
az login --service-principal -u "${{ secrets.AZURE_CLIENT_ID }}" -p "${{ secrets.AZURE_CLIENT_SECRET }}" --tenant "${{ secrets.AZURE_TENANT_ID }}"
29+
az account set --subscription "${{ secrets.AZURE_SUBSCRIPTION_ID }}"
30+
31+
# Step 3: Validate the Azure template using microsoft/template-validation-action
2132
- name: Validate Azure Template
2233
uses: microsoft/template-validation-action@v0.4.3
23-
id: validation
2434
with:
25-
workingDirectory: ./content-gen
35+
workingDirectory: .
36+
validateAzd: ${{ vars.TEMPLATE_VALIDATE_AZD }}
37+
useDevContainer: ${{ vars.TEMPLATE_USE_DEV_CONTAINER }}
38+
validateTests: ${{ vars.TEMPLATE_VALIDATE_TESTS }}
39+
id: validation
2640
env:
2741
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
2842
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
43+
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
2944
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
3045
AZURE_ENV_NAME: ${{ secrets.AZURE_ENV_NAME }}
3146
AZURE_LOCATION: ${{ secrets.AZURE_LOCATION }}
47+
AZURE_ENV_OPENAI_LOCATION: ${{ secrets.AZURE_ENV_OPENAI_LOCATION }}
3248
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33-
34-
# Step 3: Print the result of the validation
49+
50+
# Step 4: Print the result of the validation
3551
- name: Print result
36-
run: cat ${{ steps.validation.outputs.resultFile }}
52+
run: cat ${{ steps.validation.outputs.resultFile }}

.github/workflows/deploy-orchestrator.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ on:
6262
required: true
6363
type: string
6464
image_model_choice:
65-
description: 'Image model to deploy (gpt-image-1, gpt-image-1.5, none)'
65+
description: 'Image model to deploy (gpt-image-1-mini, gpt-image-1.5, none)'
6666
required: false
67-
default: 'gpt-image-1'
67+
default: 'gpt-image-1-mini'
6868
type: string
6969

7070
env:

.github/workflows/deploy-v2.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ on:
44
branches:
55
- main
66
paths:
7-
- 'content-gen/src/**'
8-
- '!content-gen/src/tests/**'
9-
- 'content-gen/infra/**/*.bicep'
10-
- 'content-gen/infra/**/*.json'
11-
- 'content-gen/*.yaml'
12-
- 'content-gen/scripts/**'
7+
- 'src/**'
8+
- '!src/tests/**'
9+
- 'infra/**/*.bicep'
10+
- 'infra/**/*.json'
11+
- '*.yaml'
12+
- 'scripts/**'
1313
- '.github/workflows/deploy-*.yml'
1414
workflow_run:
1515
workflows: ["Build Docker and Optional Push"]
@@ -103,10 +103,10 @@ on:
103103
image_model_choice:
104104
description: 'Image Model to Deploy'
105105
required: false
106-
default: 'gpt-image-1'
106+
default: 'gpt-image-1-mini'
107107
type: choice
108108
options:
109-
- 'gpt-image-1'
109+
- 'gpt-image-1-mini'
110110
- 'gpt-image-1.5'
111111
- 'none'
112112

@@ -307,8 +307,8 @@ jobs:
307307
echo "existing_webapp_url=$INPUT_EXISTING_WEBAPP_URL" >> $GITHUB_OUTPUT
308308
309309
# Validate and output image_model_choice
310-
IMAGE_MODEL="${INPUT_IMAGE_MODEL_CHOICE:-gpt-image-1}"
311-
ALLOWED_MODELS=("gpt-image-1" "gpt-image-1.5" "none")
310+
IMAGE_MODEL="${INPUT_IMAGE_MODEL_CHOICE:-gpt-image-1-mini}"
311+
ALLOWED_MODELS=("gpt-image-1-mini" "gpt-image-1.5" "none")
312312
if [[ ! " ${ALLOWED_MODELS[@]} " =~ " ${IMAGE_MODEL} " ]]; then
313313
echo "❌ ERROR: image_model_choice '$IMAGE_MODEL' is invalid. Allowed: ${ALLOWED_MODELS[*]}"
314314
exit 1
@@ -333,5 +333,5 @@ jobs:
333333
AZURE_EXISTING_AI_PROJECT_RESOURCE_ID: ${{ needs.validate-inputs.outputs.azure_existing_ai_project_resource_id || '' }}
334334
existing_webapp_url: ${{ needs.validate-inputs.outputs.existing_webapp_url || '' }}
335335
trigger_type: ${{ github.event_name }}
336-
image_model_choice: ${{ needs.validate-inputs.outputs.image_model_choice || 'gpt-image-1' }}
336+
image_model_choice: ${{ needs.validate-inputs.outputs.image_model_choice || 'gpt-image-1-mini' }}
337337
secrets: inherit

.github/workflows/docker-build.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ on:
77
- dev
88
- demo
99
paths:
10-
- 'content-gen/src/backend/**'
11-
- 'content-gen/src/app/frontend/**'
12-
- 'content-gen/src/app/frontend-server/**'
10+
- 'src/backend/**'
11+
- 'src/app/frontend/**'
12+
- 'src/app/frontend-server/**'
1313
- '.github/workflows/docker-build.yml'
1414
pull_request:
1515
types:
@@ -22,9 +22,9 @@ on:
2222
- dev
2323
- demo
2424
paths:
25-
- 'content-gen/src/backend/**'
26-
- 'content-gen/src/app/frontend/**'
27-
- 'content-gen/src/app/frontend-server/**'
25+
- 'src/backend/**'
26+
- 'src/app/frontend/**'
27+
- 'src/app/frontend-server/**'
2828
- '.github/workflows/docker-build.yml'
2929
workflow_dispatch:
3030

@@ -83,8 +83,8 @@ jobs:
8383
- name: Build and Push Docker Image for Frontend Server
8484
uses: docker/build-push-action@v6
8585
with:
86-
context: ./content-gen/src/app
87-
file: ./content-gen/src/app/WebApp.Dockerfile
86+
context: ./src/app
87+
file: ./src/app/WebApp.Dockerfile
8888
push: ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'dependabotchanges' }}
8989
tags: |
9090
${{ secrets.ACR_LOGIN_SERVER || 'acrlogin.azurecr.io' }}/content-gen-app:${{ steps.determine_tag.outputs.tagname }}
@@ -93,8 +93,8 @@ jobs:
9393
- name: Build and Push Docker Image for Backend Server
9494
uses: docker/build-push-action@v6
9595
with:
96-
context: ./content-gen/src/backend
97-
file: ./content-gen/src/backend/ApiApp.Dockerfile
96+
context: ./src/backend
97+
file: ./src/backend/ApiApp.Dockerfile
9898
push: ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'dependabotchanges' }}
9999
tags: |
100100
${{ secrets.ACR_LOGIN_SERVER || 'acrlogin.azurecr.io' }}/content-gen-api:${{ steps.determine_tag.outputs.tagname }}

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ jobs:
189189
WAF_ENABLED: ${{ inputs.WAF_ENABLED }}
190190
run: |
191191
if [[ "$WAF_ENABLED" == "true" ]]; then
192-
cp content-gen/infra/main.waf.parameters.json content-gen/infra/main.parameters.json
192+
cp infra/main.waf.parameters.json infra/main.parameters.json
193193
echo "✅ Successfully copied WAF parameters to main parameters file"
194194
else
195195
echo "🔧 Configuring Non-WAF deployment - using default main.parameters.json..."
@@ -226,9 +226,6 @@ jobs:
226226
run: |
227227
set -e
228228
229-
# Change to content-gen directory where azure.yaml lives
230-
cd content-gen
231-
232229
echo "Creating environment..."
233230
azd env new "$ENV_NAME" --no-prompt
234231
echo "Environment created: $ENV_NAME"

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ jobs:
191191
WAF_ENABLED: ${{ inputs.WAF_ENABLED }}
192192
run: |
193193
if [[ "$WAF_ENABLED" == "true" ]]; then
194-
cp content-gen/infra/main.waf.parameters.json content-gen/infra/main.parameters.json
194+
cp infra/main.waf.parameters.json infra/main.parameters.json
195195
echo "✅ Successfully copied WAF parameters to main parameters file"
196196
else
197197
echo "🔧 Configuring Non-WAF deployment - using default main.parameters.json..."
@@ -229,9 +229,6 @@ jobs:
229229
run: |
230230
$ErrorActionPreference = "Stop"
231231
232-
# Change to content-gen directory where azure.yaml lives
233-
Push-Location content-gen
234-
235232
Write-Host "Creating environment..."
236233
azd env new $env:ENV_NAME --no-prompt
237234
Write-Host "Environment created: $env:ENV_NAME"

.github/workflows/job-deploy.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ on:
6767
default: ''
6868
type: string
6969
image_model_choice:
70-
description: 'Image model to deploy (gpt-image-1, gpt-image-1.5, none)'
70+
description: 'Image model to deploy (gpt-image-1-mini, gpt-image-1.5, none)'
7171
required: false
72-
default: 'gpt-image-1'
72+
default: 'gpt-image-1-mini'
7373
type: string
7474
outputs:
7575
RESOURCE_GROUP_NAME:
@@ -334,17 +334,19 @@ jobs:
334334
env:
335335
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
336336
GPT_MIN_CAPACITY: ${{ env.GPT_MIN_CAPACITY }}
337-
IMAGE_MODEL_CHOICE: ${{ inputs.image_model_choice || 'gpt-image-1' }}
337+
IMAGE_MODEL_CHOICE: ${{ inputs.image_model_choice || 'gpt-image-1-mini' }}
338338
IMAGE_MODEL_MIN_CAPACITY: ${{ env.IMAGE_MODEL_MIN_CAPACITY }}
339339
AZURE_REGIONS: ${{ vars.AZURE_REGIONS }}
340340
run: |
341-
chmod +x content-gen/scripts/checkquota.sh
342-
if ! content-gen/scripts/checkquota.sh; then
341+
chmod +x scripts/checkquota.sh
342+
QUOTA_OUTPUT="$(scripts/checkquota.sh 2>&1)"; QUOTA_STATUS=$?
343+
echo "$QUOTA_OUTPUT"
344+
if [ "$QUOTA_STATUS" -ne 0 ]; then
343345
# If quota check fails due to insufficient quota, set the flag
344-
if grep -q "No region with sufficient quota found" content-gen/scripts/checkquota.sh; then
346+
if echo "$QUOTA_OUTPUT" | grep -q "No region with sufficient quota found"; then
345347
echo "QUOTA_FAILED=true" >> $GITHUB_ENV
346348
fi
347-
exit 1 # Fail the pipeline if any other failure occurs
349+
exit 1 # Fail the pipeline if any failure occurs
348350
fi
349351
350352
- name: Set Quota Failure Output

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ jobs:
6565
env:
6666
DOCKER_BUILD_SUMMARY: false
6767
with:
68-
context: ./content-gen/src/app
69-
file: ./content-gen/src/app/WebApp.Dockerfile
68+
context: ./src/app
69+
file: ./src/app/WebApp.Dockerfile
7070
push: true
7171
tags: |
7272
${{ secrets.ACR_TEST_LOGIN_SERVER }}/content-gen-app:${{ steps.generate_docker_tag.outputs.IMAGE_TAG }}
@@ -78,8 +78,8 @@ jobs:
7878
env:
7979
DOCKER_BUILD_SUMMARY: false
8080
with:
81-
context: ./content-gen/src/backend
82-
file: ./content-gen/src/backend/ApiApp.Dockerfile
81+
context: ./src/backend
82+
file: ./src/backend/ApiApp.Dockerfile
8383
push: true
8484
tags: |
8585
${{ secrets.ACR_TEST_LOGIN_SERVER }}/content-gen-api:${{ steps.generate_docker_tag.outputs.IMAGE_TAG }}

0 commit comments

Comments
 (0)