Skip to content

Commit b75d196

Browse files
feat: Migrate Azure Function and backend (app.py) in API App
feat: Migrate Azure Function and backend (app.py) in API App
2 parents e056ac4 + aafbe22 commit b75d196

File tree

140 files changed

+2970
-3531
lines changed

Some content is hidden

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

140 files changed

+2970
-3531
lines changed

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ updates:
1111
open-pull-requests-limit: 100
1212

1313
- package-ecosystem: "pip"
14-
directory: "/src/App"
14+
directory: "/src/api"
1515
schedule:
1616
interval: "monthly"
1717
commit-message:
@@ -20,7 +20,7 @@ updates:
2020
open-pull-requests-limit: 100
2121

2222
- package-ecosystem: "npm"
23-
directory: "/src/App/frontend"
23+
directory: "/src/App"
2424
schedule:
2525
interval: "monthly"
2626
commit-message:

.github/workflows/deploy-KMGeneric.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ jobs:
103103
104104
- name: Determine Tag Name Based on Branch
105105
id: determine_tag
106-
run: echo "tagname=${{ github.ref_name == 'main' && 'latest' || github.ref_name == 'dev' && 'dev' || github.ref_name == 'demo' && 'demo' || github.ref_name == 'dependabotchanges' && 'dependabotchanges' || github.head_ref || 'default' }}" >> $GITHUB_OUTPUT
106+
run: echo "tagname=${{ github.ref_name == 'main' && 'latest_migrated' || github.ref_name == 'dev' && 'dev' || github.ref_name == 'demo' && 'demo' || github.ref_name == 'dependabotchanges' && 'dependabotchanges' || github.head_ref || 'default' }}" >> $GITHUB_OUTPUT
107107

108108
- name: Deploy Bicep Template
109109
id: deploy

.github/workflows/docker-build.yml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
id: determine_tag
5050
run: |
5151
if [[ "${{ github.ref_name }}" == "main" ]]; then
52-
echo "tagname=latest" >> $GITHUB_OUTPUT
52+
echo "tagname=latest_migrated" >> $GITHUB_OUTPUT
5353
elif [[ "${{ github.ref_name }}" == "dev" ]]; then
5454
echo "tagname=dev" >> $GITHUB_OUTPUT
5555
elif [[ "${{ github.ref_name }}" == "demo" ]]; then
@@ -70,22 +70,12 @@ jobs:
7070
${{ secrets.ACR_LOGIN_SERVER }}/km-app:${{ steps.determine_tag.outputs.tagname }}
7171
${{ secrets.ACR_LOGIN_SERVER }}/km-app:${{ steps.determine_tag.outputs.tagname }}_${{ steps.date.outputs.date }}_${{ github.run_number }}
7272
73-
- name: Build and Push Docker Image for km-rag-function
73+
- name: Build and Push Docker Image for api
7474
uses: docker/build-push-action@v6
7575
with:
76-
context: ./src/api/km-rag-function
77-
file: ./src/api/km-rag-function/Dockerfile
76+
context: ./src/api
77+
file: ./src/api/ApiApp.Dockerfile
7878
push: ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'dependabotchanges' }}
7979
tags: |
80-
${{ secrets.ACR_LOGIN_SERVER }}/km-rag-function:${{ steps.determine_tag.outputs.tagname }}
81-
${{ secrets.ACR_LOGIN_SERVER }}/km-rag-function:${{ steps.determine_tag.outputs.tagname }}_${{ steps.date.outputs.date }}_${{ github.run_number }}
82-
83-
- name: Build and Push Docker Image for km-charts-function
84-
uses: docker/build-push-action@v6
85-
with:
86-
context: ./src/api/km-charts-function
87-
file: ./src/api/km-charts-function/Dockerfile
88-
push: ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'dependabotchanges' }}
89-
tags: |
90-
${{ secrets.ACR_LOGIN_SERVER }}/km-charts-function:${{ steps.determine_tag.outputs.tagname }}
91-
${{ secrets.ACR_LOGIN_SERVER }}/km-charts-function:${{ steps.determine_tag.outputs.tagname }}_${{ steps.date.outputs.date }}_${{ github.run_number }}
80+
${{ secrets.ACR_LOGIN_SERVER }}/km-api:${{ steps.determine_tag.outputs.tagname }}
81+
${{ secrets.ACR_LOGIN_SERVER }}/km-api:${{ steps.determine_tag.outputs.tagname }}_${{ steps.date.outputs.date }}_${{ github.run_number }}

.github/workflows/pylint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ jobs:
1919
- name: Install dependencies
2020
run: |
2121
python -m pip install --upgrade pip
22-
pip install -r src/App/requirements.txt
22+
pip install -r src/api/requirements.txt
2323
pip install flake8 # Ensure flake8 is installed explicitly
2424
2525
- name: Run flake8 and pylint
2626
run: |
27-
flake8 --config=.flake8 src/App/backend # Specify the directory to lint
27+
flake8 --config=.flake8 src/api # Specify the directory to lint

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ jobs:
7474
- name: Install Backend Dependencies
7575
run: |
7676
python -m pip install --upgrade pip
77-
pip install -r src/App/requirements.txt
77+
pip install -r src/api/requirements.txt
7878
pip install pytest-cov
7979
pip install pytest-asyncio
8080
8181
- name: Check if Backend Test Files Exist
8282
id: check_backend_tests
8383
run: |
84-
if [ -z "$(find src/App/backend -type f -name 'test_*.py')" ]; then
84+
if [ -z "$(find src/api -type f -name 'test_*.py')" ]; then
8585
echo "No backend test files found, skipping backend tests."
8686
echo "skip_backend_tests=true" >> $GITHUB_ENV
8787
else

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
################################################################################
22
# This .gitignore file was automatically created by Microsoft(R) Visual Studio.
33
################################################################################
4-
*.env
54
*.venv
65
*.vscode
76
*.vs
@@ -10,3 +9,4 @@
109
/LUISSchemaSerializationTool/LUISSchemaSerializationTool/obj
1110
.fake
1211
.azure
12+
.idea
89.1 KB
Loading

infra/deploy_ai_foundry.bicep

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -701,3 +701,5 @@ output aiProjectName string = aiHubProject.name
701701
output applicationInsightsId string = applicationInsights.id
702702
output logAnalyticsWorkspaceResourceName string = logAnalytics.name
703703
output storageAccountName string = storageNameCleaned
704+
705+
output azureOpenAIKeyName string = azureOpenAIApiKeyEntry.name

0 commit comments

Comments
 (0)