Skip to content

Commit 1dc9499

Browse files
2 parents b8e673a + 95c8134 commit 1dc9499

File tree

504 files changed

+111
-98961
lines changed

Some content is hidden

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

504 files changed

+111
-98961
lines changed
File renamed without changes.

.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-v2.yml

Lines changed: 6 additions & 6 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"]

.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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,10 +338,10 @@ jobs:
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+
if ! scripts/checkquota.sh; then
343343
# 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
344+
if grep -q "No region with sufficient quota found" scripts/checkquota.sh; then
345345
echo "QUOTA_FAILED=true" >> $GITHUB_ENV
346346
fi
347347
exit 1 # Fail the pipeline if any other failure occurs

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

.github/workflows/pylint.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ name: PyLint
33
on:
44
push:
55
paths:
6-
- 'content-gen/src/backend/**/*.py'
7-
- 'content-gen/src/backend/requirements*.txt'
6+
- 'src/backend/**/*.py'
7+
- 'src/backend/requirements*.txt'
88
- '.flake8'
99
- '.github/workflows/pylint.yml'
1010

@@ -29,9 +29,9 @@ jobs:
2929
- name: Install dependencies
3030
run: |
3131
python -m pip install --upgrade pip
32-
pip install -r content-gen/src/backend/requirements.txt
32+
pip install -r src/backend/requirements.txt
3333
pip install flake8 # Ensure flake8 is installed explicitly
3434
3535
- name: Run flake8
3636
run: |
37-
flake8 --config=.flake8 content-gen/src/backend # Specify the directory to lint
37+
flake8 --config=.flake8 src/backend # Specify the directory to lint

0 commit comments

Comments
 (0)