Skip to content

Commit 7944e5b

Browse files
committed
first commit
0 parents  commit 7944e5b

File tree

209 files changed

+31791
-0
lines changed

Some content is hidden

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

209 files changed

+31791
-0
lines changed

.azdo/pipelines/azure-dev.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Run when commits are pushed to mainline branch (main or master)
2+
# Set this to the mainline branch you are using
3+
trigger:
4+
- main
5+
- master
6+
7+
# Azure Pipelines workflow to deploy to Azure using azd
8+
# To configure required secrets and service connection for connecting to Azure, simply run `azd pipeline config --provider azdo`
9+
# Task "Install azd" needs to install setup-azd extension for azdo - https://marketplace.visualstudio.com/items?itemName=ms-azuretools.azd
10+
# See below for alternative task to install azd if you can't install above task in your organization
11+
12+
pool:
13+
vmImage: ubuntu-latest
14+
15+
steps:
16+
- task: setup-azd@0
17+
displayName: Install azd
18+
19+
# If you can't install above task in your organization, you can comment it and uncomment below task to install azd
20+
# - task: Bash@3
21+
# displayName: Install azd
22+
# inputs:
23+
# targetType: 'inline'
24+
# script: |
25+
# curl -fsSL https://aka.ms/install-azd.sh | bash
26+
27+
# azd delegate auth to az to use service connection with AzureCLI@2
28+
- pwsh: |
29+
azd config set auth.useAzCliAuth "true"
30+
displayName: Configure AZD to Use AZ CLI Authentication.
31+
32+
- task: AzureCLI@2
33+
displayName: Provision Infrastructure
34+
inputs:
35+
azureSubscription: azconnection
36+
scriptType: bash
37+
scriptLocation: inlineScript
38+
inlineScript: |
39+
azd provision --no-prompt
40+
env:
41+
AZURE_SUBSCRIPTION_ID: $(AZURE_SUBSCRIPTION_ID)
42+
AZURE_ENV_NAME: $(AZURE_ENV_NAME)
43+
AZURE_LOCATION: $(AZURE_LOCATION)
44+
- task: AzureCLI@2
45+
displayName: Deploy Application
46+
inputs:
47+
azureSubscription: azconnection
48+
scriptType: bash
49+
scriptLocation: inlineScript
50+
inlineScript: |
51+
azd deploy --no-prompt
52+
env:
53+
AZURE_SUBSCRIPTION_ID: $(AZURE_SUBSCRIPTION_ID)
54+
AZURE_ENV_NAME: $(AZURE_ENV_NAME)
55+
AZURE_LOCATION: $(AZURE_LOCATION)

.devcontainer/devcontainer.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "azd-template",
3+
"image": "mcr.microsoft.com/devcontainers/python:3.11-bullseye",
4+
"forwardPorts": [50505],
5+
"features": {
6+
"ghcr.io/azure/azure-dev/azd:latest": {}
7+
},
8+
"customizations": {
9+
"vscode": {
10+
"extensions": [
11+
"ms-azuretools.azure-dev",
12+
"ms-azuretools.vscode-bicep",
13+
"ms-python.python",
14+
"ms-toolsai.jupyter",
15+
"GitHub.vscode-github-actions"
16+
]
17+
}
18+
},
19+
"postStartCommand": "git pull origin main && python3 -m pip install -r ./src/frontend/requirements.txt && python3 -m pip install -r ./src/backend/requirements.txt",
20+
"remoteUser": "vscode",
21+
"hostRequirements": {
22+
"memory": "4gb"
23+
}
24+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Azure Template Validation
2+
on:
3+
# workflow_dispatch:
4+
push:
5+
branches:
6+
- main
7+
permissions:
8+
contents: read
9+
id-token: write
10+
pull-requests: write
11+
jobs:
12+
template_validation_job:
13+
runs-on: ubuntu-latest
14+
environment: dev
15+
name: Template validation
16+
steps:
17+
# Step 1: Checkout the code from your repository
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
# Step 2: Validate the Azure template using microsoft/template-validation-action
21+
- name: Validate Azure Template
22+
uses: microsoft/[email protected]
23+
id: validation
24+
env:
25+
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
26+
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
27+
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
28+
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
29+
AZURE_ENV_NAME: ${{ secrets.AZURE_ENV_NAME }}
30+
AZURE_LOCATION: ${{ secrets.AZURE_LOCATION }}
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
# Step 3: Print the result of the validation
33+
- name: Print result
34+
run: cat ${{ steps.validation.outputs.resultFile }}

0 commit comments

Comments
 (0)