Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
3c1a68d
fix: Update Azure Template Validation workflow to include push trigge…
Kanchan-Microsoft Mar 5, 2026
3c1974f
docs: Add sections for Features, Guidance, and Resources in README
Kanchan-Microsoft Mar 5, 2026
09ffc62
Remove working
Kanchan-Microsoft Mar 5, 2026
0a49193
Remove working Directory parameter from Azure Template Validation step
Kanchan-Microsoft Mar 5, 2026
e764f0f
edited
Kanchan-Microsoft Mar 5, 2026
d40e5d1
add .templateignore file to exclude unnecessary directories
Kanchan-Microsoft Mar 5, 2026
e21886e
Enhance Azure template validation workflow by copying necessary file…
Kanchan-Microsoft Mar 6, 2026
6a1345a
azure template validation
Kanchan-Microsoft Mar 6, 2026
9ca3dd0
removed doc-gen
Kanchan-Microsoft Mar 6, 2026
81f78a0
moved content-gen to root
Kanchan-Microsoft Mar 6, 2026
a03c320
Refactor Azure template validation workflow by adding Azure login ste…
Harmanpreet-Microsoft Mar 6, 2026
b3b1bd4
updated readme
Kanchan-Microsoft Mar 6, 2026
daf91a0
Merge branch 'psl-bug-36267' of https://github.com/microsoft/content-…
Kanchan-Microsoft Mar 6, 2026
94205de
template validation
Kanchan-Microsoft Mar 9, 2026
4e27fba
azure template validation
Kanchan-Microsoft Mar 9, 2026
54f854c
azure template validation
Kanchan-Microsoft Mar 9, 2026
8b3aa8a
template validation
Kanchan-Microsoft Mar 9, 2026
e00667d
template validation
Kanchan-Microsoft Mar 9, 2026
072292f
validation
Kanchan-Microsoft Mar 9, 2026
90df699
template validation
Kanchan-Microsoft Mar 9, 2026
5f0a23a
validate
Kanchan-Microsoft Mar 9, 2026
3d9097c
validation
Kanchan-Microsoft Mar 9, 2026
7e2d105
validation
Kanchan-Microsoft Mar 9, 2026
47a24b9
template validation
Kanchan-Microsoft Mar 9, 2026
b891b69
azure template validation
Kanchan-Microsoft Mar 9, 2026
d6f5238
template validation
Kanchan-Microsoft Mar 9, 2026
d417a97
template validation
Kanchan-Microsoft Mar 9, 2026
d626553
validation
Kanchan-Microsoft Mar 10, 2026
fce30d1
validate
Kanchan-Microsoft Mar 10, 2026
add2f0a
Merge branch 'dev' into psl-bug-36267
Kanchan-Microsoft Mar 10, 2026
610b902
fixed broken links
Kanchan-Microsoft Mar 10, 2026
1ff0872
fixed broken links
Kanchan-Microsoft Mar 10, 2026
515e724
Add technical guide and fixed broken links
Kanchan-Microsoft Mar 10, 2026
3783197
Refactor paths in workflow and configuration files to remove 'content…
Kanchan-Microsoft Mar 11, 2026
997ac56
Refactor paths in documentation and workflow files to remove 'content…
Kanchan-Microsoft Mar 11, 2026
dad2615
Merge branch 'dev' into psl-bug-36267
Kanchan-Microsoft Mar 13, 2026
2cb9ce8
template validation
Kanchan-Microsoft Mar 13, 2026
cd42c9a
template validation
Kanchan-Microsoft Mar 13, 2026
77ef761
fix: remove psl-bug-36267 branch from push triggers in Azure workflow
Kanchan-Microsoft Mar 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
File renamed without changes.
10 changes: 5 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ updates:
# Python (pip) dependencies - grouped
- package-ecosystem: "pip"
directories:
- "/content-gen/src/backend"
- "/content-gen/infra/vscode_web"
- "/content-gen/scripts"
- "/src/backend"
- "/infra/vscode_web"
- "/scripts"
schedule:
interval: "monthly"
target-branch: "dependabotchanges"
Expand All @@ -35,8 +35,8 @@ updates:
# npm dependencies - grouped
- package-ecosystem: "npm"
directories:
- "/content-gen/src/app/frontend"
- "/content-gen/src/app/frontend-server"
- "/src/app/frontend"
- "/src/app/frontend-server"
schedule:
interval: "monthly"
target-branch: "dependabotchanges"
Expand Down
34 changes: 25 additions & 9 deletions .github/workflows/azure-dev.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,52 @@
name: Azure Template Validation
on:
workflow_dispatch:

push:
branches:
- main

permissions:
contents: read
id-token: write
pull-requests: write

jobs:
template_validation_job:
runs-on: ubuntu-latest
environment: production
name: Template validation

steps:
# Step 1: Checkout the code from your repository
- name: Checkout code
uses: actions/checkout@v4

# Step 2: Validate the Azure template using microsoft/template-validation-action
# Step 2: Pre-authenticate Azure for azd validation
- name: Login to Azure
shell: bash
run: |
az login --service-principal -u "${{ secrets.AZURE_CLIENT_ID }}" -p "${{ secrets.AZURE_CLIENT_SECRET }}" --tenant "${{ secrets.AZURE_TENANT_ID }}"
az account set --subscription "${{ secrets.AZURE_SUBSCRIPTION_ID }}"

# Step 3: Validate the Azure template using microsoft/template-validation-action
- name: Validate Azure Template
uses: microsoft/template-validation-action@v0.4.3
id: validation
with:
workingDirectory: ./content-gen
workingDirectory: .
validateAzd: ${{ vars.TEMPLATE_VALIDATE_AZD }}
useDevContainer: ${{ vars.TEMPLATE_USE_DEV_CONTAINER }}
validateTests: ${{ vars.TEMPLATE_VALIDATE_TESTS }}
id: validation
env:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
AZURE_ENV_NAME: ${{ secrets.AZURE_ENV_NAME }}
AZURE_LOCATION: ${{ secrets.AZURE_LOCATION }}
AZURE_ENV_OPENAI_LOCATION: ${{ secrets.AZURE_ENV_OPENAI_LOCATION }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Step 3: Print the result of the validation
# Step 4: Print the result of the validation
- name: Print result
run: cat ${{ steps.validation.outputs.resultFile }}
run: cat ${{ steps.validation.outputs.resultFile }}
12 changes: 6 additions & 6 deletions .github/workflows/deploy-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ on:
branches:
- main
paths:
- 'content-gen/src/**'
- '!content-gen/src/tests/**'
- 'content-gen/infra/**/*.bicep'
- 'content-gen/infra/**/*.json'
- 'content-gen/*.yaml'
- 'content-gen/scripts/**'
- 'src/**'
- '!src/tests/**'
- 'infra/**/*.bicep'
- 'infra/**/*.json'
- '*.yaml'
- 'scripts/**'
- '.github/workflows/deploy-*.yml'
workflow_run:
workflows: ["Build Docker and Optional Push"]
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ on:
- dev
- demo
paths:
- 'content-gen/src/backend/**'
- 'content-gen/src/app/frontend/**'
- 'content-gen/src/app/frontend-server/**'
- 'src/backend/**'
- 'src/app/frontend/**'
- 'src/app/frontend-server/**'
- '.github/workflows/docker-build.yml'
pull_request:
types:
Expand All @@ -22,9 +22,9 @@ on:
- dev
- demo
paths:
- 'content-gen/src/backend/**'
- 'content-gen/src/app/frontend/**'
- 'content-gen/src/app/frontend-server/**'
- 'src/backend/**'
- 'src/app/frontend/**'
- 'src/app/frontend-server/**'
- '.github/workflows/docker-build.yml'
workflow_dispatch:

Expand Down Expand Up @@ -83,8 +83,8 @@ jobs:
- name: Build and Push Docker Image for Frontend Server
uses: docker/build-push-action@v6
with:
context: ./content-gen/src/app
file: ./content-gen/src/app/WebApp.Dockerfile
context: ./src/app
file: ./src/app/WebApp.Dockerfile
push: ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'dependabotchanges' }}
tags: |
${{ secrets.ACR_LOGIN_SERVER || 'acrlogin.azurecr.io' }}/content-gen-app:${{ steps.determine_tag.outputs.tagname }}
Expand All @@ -93,8 +93,8 @@ jobs:
- name: Build and Push Docker Image for Backend Server
uses: docker/build-push-action@v6
with:
context: ./content-gen/src/backend
file: ./content-gen/src/backend/ApiApp.Dockerfile
context: ./src/backend
file: ./src/backend/ApiApp.Dockerfile
push: ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'dependabotchanges' }}
tags: |
${{ secrets.ACR_LOGIN_SERVER || 'acrlogin.azurecr.io' }}/content-gen-api:${{ steps.determine_tag.outputs.tagname }}
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/job-deploy-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ jobs:
WAF_ENABLED: ${{ inputs.WAF_ENABLED }}
run: |
if [[ "$WAF_ENABLED" == "true" ]]; then
cp content-gen/infra/main.waf.parameters.json content-gen/infra/main.parameters.json
cp infra/main.waf.parameters.json infra/main.parameters.json
echo "✅ Successfully copied WAF parameters to main parameters file"
else
echo "🔧 Configuring Non-WAF deployment - using default main.parameters.json..."
Expand Down Expand Up @@ -226,9 +226,6 @@ jobs:
run: |
set -e

# Change to content-gen directory where azure.yaml lives
cd content-gen

echo "Creating environment..."
azd env new "$ENV_NAME" --no-prompt
echo "Environment created: $ENV_NAME"
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/job-deploy-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ jobs:
WAF_ENABLED: ${{ inputs.WAF_ENABLED }}
run: |
if [[ "$WAF_ENABLED" == "true" ]]; then
cp content-gen/infra/main.waf.parameters.json content-gen/infra/main.parameters.json
cp infra/main.waf.parameters.json infra/main.parameters.json
echo "✅ Successfully copied WAF parameters to main parameters file"
else
echo "🔧 Configuring Non-WAF deployment - using default main.parameters.json..."
Expand Down Expand Up @@ -229,9 +229,6 @@ jobs:
run: |
$ErrorActionPreference = "Stop"

# Change to content-gen directory where azure.yaml lives
Push-Location content-gen

Write-Host "Creating environment..."
azd env new $env:ENV_NAME --no-prompt
Write-Host "Environment created: $env:ENV_NAME"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/job-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,10 @@ jobs:
IMAGE_MODEL_MIN_CAPACITY: ${{ env.IMAGE_MODEL_MIN_CAPACITY }}
AZURE_REGIONS: ${{ vars.AZURE_REGIONS }}
run: |
chmod +x content-gen/scripts/checkquota.sh
if ! content-gen/scripts/checkquota.sh; then
chmod +x scripts/checkquota.sh
if ! scripts/checkquota.sh; then
# If quota check fails due to insufficient quota, set the flag
if grep -q "No region with sufficient quota found" content-gen/scripts/checkquota.sh; then
if grep -q "No region with sufficient quota found" scripts/checkquota.sh; then
echo "QUOTA_FAILED=true" >> $GITHUB_ENV
fi
exit 1 # Fail the pipeline if any other failure occurs
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/job-docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ jobs:
env:
DOCKER_BUILD_SUMMARY: false
with:
context: ./content-gen/src/app
file: ./content-gen/src/app/WebApp.Dockerfile
context: ./src/app
file: ./src/app/WebApp.Dockerfile
push: true
tags: |
${{ secrets.ACR_TEST_LOGIN_SERVER }}/content-gen-app:${{ steps.generate_docker_tag.outputs.IMAGE_TAG }}
Expand All @@ -78,8 +78,8 @@ jobs:
env:
DOCKER_BUILD_SUMMARY: false
with:
context: ./content-gen/src/backend
file: ./content-gen/src/backend/ApiApp.Dockerfile
context: ./src/backend
file: ./src/backend/ApiApp.Dockerfile
push: true
tags: |
${{ secrets.ACR_TEST_LOGIN_SERVER }}/content-gen-api:${{ steps.generate_docker_tag.outputs.IMAGE_TAG }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: PyLint
on:
push:
paths:
- 'content-gen/src/backend/**/*.py'
- 'content-gen/src/backend/requirements*.txt'
- 'src/backend/**/*.py'
- 'src/backend/requirements*.txt'
- '.flake8'
- '.github/workflows/pylint.yml'

Expand All @@ -29,9 +29,9 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r content-gen/src/backend/requirements.txt
pip install -r src/backend/requirements.txt
pip install flake8 # Ensure flake8 is installed explicitly

- name: Run flake8
run: |
flake8 --config=.flake8 content-gen/src/backend # Specify the directory to lint
flake8 --config=.flake8 src/backend # Specify the directory to lint
10 changes: 5 additions & 5 deletions .github/workflows/telemetry-template-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- main
paths:
- 'content-gen/azure.yaml'
- 'azure.yaml'

permissions:
contents: read
Expand All @@ -22,13 +22,13 @@ jobs:

- name: Check for required metadata template line
run: |
if grep -E '^\s*#\s*template:\s*content-generation@' content-gen/azure.yaml; then
echo "ERROR: 'template' line is commented out in content-gen/azure.yaml! Please uncomment template line."
if grep -E '^\s*#\s*template:\s*content-generation@' azure.yaml; then
echo "ERROR: 'template' line is commented out in azure.yaml! Please uncomment template line."
exit 1
fi

if ! grep -E '^\s*template:\s*content-generation@' content-gen/azure.yaml; then
echo "ERROR: Required 'template' line is missing in content-gen/azure.yaml! Please add template line for telemetry."
if ! grep -E '^\s*template:\s*content-generation@' azure.yaml; then
echo "ERROR: Required 'template' line is missing in azure.yaml! Please add template line for telemetry."
exit 1
fi
echo "template line is present and not commented."
14 changes: 7 additions & 7 deletions .github/workflows/test-automation-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r content-gen/tests/e2e-test/requirements.txt
pip install -r tests/e2e-test/requirements.txt

- name: Ensure browsers are installed
run: python -m playwright install --with-deps chromium
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
else
xvfb-run pytest --html=report/report.html --self-contained-html
fi
working-directory: content-gen/tests/e2e-test
working-directory: tests/e2e-test
continue-on-error: true

- name: Sleep for 30 seconds
Expand All @@ -115,7 +115,7 @@ jobs:
else
xvfb-run pytest --html=report/report.html --self-contained-html
fi
working-directory: content-gen/tests/e2e-test
working-directory: tests/e2e-test
continue-on-error: true

- name: Sleep for 60 seconds
Expand All @@ -132,7 +132,7 @@ jobs:
else
xvfb-run pytest --html=report/report.html --self-contained-html
fi
working-directory: content-gen/tests/e2e-test
working-directory: tests/e2e-test

- name: Upload test report
id: upload_report
Expand All @@ -141,9 +141,9 @@ jobs:
with:
name: test-report
path: |
content-gen/tests/e2e-test/report/*
content-gen/tests/e2e-test/tests/screenshots/*
content-gen/tests/e2e-test/screenshots/*
tests/e2e-test/report/*
tests/e2e-test/tests/screenshots/*
tests/e2e-test/screenshots/*

- name: Generate E2E Test Summary
if: always()
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- dev
paths:
- '**/*.py'
- 'content-gen/src/backend/requirements*.txt'
- 'src/backend/requirements*.txt'
- '.github/workflows/test.yml'
pull_request:
types:
Expand All @@ -20,7 +20,7 @@ on:
- dev
paths:
- '**/*.py'
- 'content-gen/src/backend/requirements*.txt'
- 'src/backend/requirements*.txt'
- '.github/workflows/test.yml'

permissions:
Expand All @@ -43,14 +43,14 @@ jobs:
- name: Install Backend Dependencies
run: |
python -m pip install --upgrade pip
pip install -r content-gen/src/backend/requirements.txt
pip install -r src/backend/requirements.txt
pip install pytest-cov
pip install pytest-asyncio

- name: Check if Backend Test Files Exist
id: check_backend_tests
run: |
if [ -z "$(find content-gen/src/tests -type f -name 'test_*.py' 2>/dev/null)" ]; then
if [ -z "$(find src/tests -type f -name 'test_*.py' 2>/dev/null)" ]; then
echo "No backend test files found, skipping backend tests."
echo "skip_backend_tests=true" >> $GITHUB_ENV
else
Expand All @@ -61,7 +61,7 @@ jobs:
- name: Run Backend Tests with Coverage
if: env.skip_backend_tests == 'false'
run: |
pytest --cov=. --cov-report=term-missing --cov-report=xml ./content-gen/src/tests
pytest --cov=. --cov-report=term-missing --cov-report=xml ./src/tests

- name: Skip Backend Tests
if: env.skip_backend_tests == 'true'
Expand Down
12 changes: 6 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ eggs/
*.swo

# Node
/content-gen/src/app/frontend/node_modules/
/content-gen/src/app/frontend-server/node_modules/
/content-gen/src/app/frontend-server/static/
/content-gen/src/app/frontend-server/*.zip
/src/app/frontend/node_modules/
/src/app/frontend-server/node_modules/
/src/app/frontend-server/static/
/src/app/frontend-server/*.zip
node_modules/

# Build output
/content-gen/src/app/static/
/content-gen/src/app/frontend/dist/
/src/app/static/
/src/app/frontend/dist/

# Logs
*.log
Expand Down
Loading
Loading