Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Merging Dev changes to Main branch #188

Merged
merged 144 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
144 commits
Select commit Hold shift + click to select a range
579c996
fix bug #7834
UtkarshMishra-Microsoft Oct 30, 2024
9b313b1
fixissue7834
UtkarshMishra-Microsoft Oct 30, 2024
0da12b9
Update docker-build-and-push.yml
Pavan-Microsoft Oct 31, 2024
4aa8795
Update deployment.json
Pavan-Microsoft Oct 31, 2024
2055838
Merge pull request #3 from Roopan-Microsoft/PSL-Publishtodevtag
Roopan-Microsoft Oct 31, 2024
c5a0d6c
Merge branch 'microsoft:main' into main
AjitPadhi-Microsoft Nov 4, 2024
8144e24
Fix the bug 9825
Mohan-Microsoft Nov 5, 2024
57dc21e
Merge pull request #7 from Roopan-Microsoft/PSL-DG-BUG-9825
Mohan-Microsoft Nov 5, 2024
92e45e3
Merge pull request #5 from Roopan-Microsoft/bug_fix_psl_7834
UtkarshMishra-Microsoft Nov 6, 2024
b5d89b2
Update README.md
Pavan-Microsoft Nov 6, 2024
1fbb2f6
Updated the system prompt to resolve
Priyanka-Microsoft Nov 7, 2024
cdd149a
Bug10178 fix disable clear all history if there is no chat history
Nov 7, 2024
1a2e752
Merge pull request #11 from Roopan-Microsoft/Bug10178
Himanshi-Mirosoft Nov 7, 2024
2f1e57b
Merge pull request #8 from Roopan-Microsoft/psl-onclick-dev
Roopan-Microsoft Nov 7, 2024
ab935a2
fix: Chat history template name is accepting empty strings as well
Prasanjeet-Microsoft Nov 7, 2024
77eee2b
Merge pull request #12 from Roopan-Microsoft/PSL-BUG-10171
Roopan-Microsoft Nov 7, 2024
b838fa4
slightly refined prompt
Priyanka-Microsoft Nov 7, 2024
14922ff
slightly refined prompt
Priyanka-Microsoft Nov 7, 2024
3db1fc8
Bug10177 fixed Edit and Delete btn disable when message is generating
Nov 8, 2024
860bfca
Bug9825 fix for Mohan's Bug
Nov 8, 2024
d9cc353
Merge pull request #10 from Priyanka-Microsoft/feature/7571-psl-bug-r…
Roopan-Microsoft Nov 8, 2024
b0d46f1
Merge pull request #13 from Roopan-Microsoft/Bug10177
Roopan-Microsoft Nov 8, 2024
9eae22b
Update app.py
Prajwal-Microsoft Nov 15, 2024
992ac8f
fix: A brand new section getting added while removing section one by …
Prasanjeet-Microsoft Nov 15, 2024
63bd46b
Merge branch 'microsoft:main' into main
AjitPadhi-Microsoft Nov 15, 2024
5948cd5
Merge pull request #14 from Roopan-Microsoft/PSL-BUG-10345
Roopan-Microsoft Nov 15, 2024
77c20bd
Added CODEOWNERS file for DocGen
UtkarshMishra-Microsoft Nov 25, 2024
07629d3
Add code quality workflow
UtkarshMishra-Microsoft Dec 5, 2024
0163531
Add code quality workflow push
UtkarshMishra-Microsoft Dec 6, 2024
41be3c4
Merge pull request #19 from Roopan-Microsoft/Pylint-Implementation
UtkarshMishra-Microsoft Dec 9, 2024
ae331d4
Merge pull request #15 from Roopan-Microsoft/add-codeowners
UtkarshMishra-Microsoft Dec 9, 2024
448bac6
added separate image tag based on branch
AjitPadhi-Microsoft Dec 10, 2024
c822981
fixed registry issue
AjitPadhi-Microsoft Dec 11, 2024
dfeba4b
fixed registry issue
AjitPadhi-Microsoft Dec 11, 2024
78fa84d
fixed registry issue
AjitPadhi-Microsoft Dec 11, 2024
f041cc3
removed unwanted branch
AjitPadhi-Microsoft Dec 11, 2024
4f922e1
updated workflow
AjitPadhi-Microsoft Dec 11, 2024
3491d0c
Merge pull request #112 from microsoft/PSL-US-11557
Roopan-Microsoft Dec 11, 2024
edfcc5c
Created a pipeline to execute and verify unit tests, and for one-clic…
Priyanka-Microsoft Dec 12, 2024
ae7d2b2
Merge pull request #118 from microsoft/feature/10949-unit-test-and-va…
Roopan-Microsoft Dec 12, 2024
f062914
Update Chat.tsx
Himanshi-Mirosoft Dec 16, 2024
a0f2d63
Merge pull request #123 from microsoft/Bug11709
Roopan-Microsoft Dec 17, 2024
965253e
Merge pull request #124 from microsoft/main
Prajwal-Microsoft Dec 18, 2024
f153a74
build: bump azure-cosmos from 4.7.0 to 4.9.0
dependabot[bot] Dec 23, 2024
178d040
build: bump azure-storage-blob from 12.17.0 to 12.24.0
dependabot[bot] Dec 23, 2024
b9f6f9c
build: bump uvicorn from 0.24.0 to 0.34.0
dependabot[bot] Dec 23, 2024
3552800
build: bump langchain from 0.2.12 to 0.3.13
dependabot[bot] Dec 23, 2024
32a1f30
build: bump azure-ai-documentintelligence from 1.0.0b2 to 1.0.0
dependabot[bot] Dec 23, 2024
a9e6bb7
build: bump eslint-plugin-react-hooks from 4.6.0 to 5.1.0 in /frontend
dependabot[bot] Dec 23, 2024
c332474
build: bump @fluentui/react-components in /frontend
dependabot[bot] Dec 23, 2024
17a839e
build: bump @types/node from 20.12.7 to 22.10.2 in /frontend
dependabot[bot] Dec 23, 2024
288cfa6
build: bump @types/jest from 29.5.12 to 29.5.14 in /frontend
dependabot[bot] Dec 23, 2024
f88fbb3
build: bump @typescript-eslint/eslint-plugin in /frontend
dependabot[bot] Dec 23, 2024
25a2fae
build: bump react-markdown from 7.1.2 to 9.0.1 in /frontend
dependabot[bot] Dec 23, 2024
e7af13a
Merge pull request #144 from microsoft/dependabot/npm_and_yarn/fronte…
Roopan-Microsoft Dec 26, 2024
e0211b8
Merge pull request #143 from microsoft/dependabot/npm_and_yarn/fronte…
Roopan-Microsoft Dec 26, 2024
5fc6c71
Merge pull request #142 from microsoft/dependabot/npm_and_yarn/fronte…
Roopan-Microsoft Dec 26, 2024
2546df1
Merge pull request #141 from microsoft/dependabot/npm_and_yarn/fronte…
Roopan-Microsoft Dec 26, 2024
1d7dce8
build: bump plotly.js from 2.32.0 to 2.35.3 in /frontend
dependabot[bot] Dec 26, 2024
985173f
build: bump prettier from 3.2.5 to 3.4.2 in /frontend
dependabot[bot] Dec 26, 2024
438a3e2
build: bump @typescript-eslint/parser from 6.21.0 to 8.18.2 in /frontend
dependabot[bot] Dec 26, 2024
9573e67
Merge pull request #140 from microsoft/dependabot/npm_and_yarn/fronte…
Roopan-Microsoft Dec 26, 2024
b5de69f
Merge pull request #139 from microsoft/dependabot/npm_and_yarn/fronte…
Roopan-Microsoft Dec 26, 2024
e502b53
Merge pull request #138 from microsoft/dependabot/npm_and_yarn/fronte…
Roopan-Microsoft Dec 26, 2024
044e2cd
Merge pull request #137 from microsoft/dependabot/npm_and_yarn/fronte…
Roopan-Microsoft Dec 26, 2024
a58c8ba
Merge pull request #136 from microsoft/dependabot/pip/dependabotchang…
Roopan-Microsoft Dec 26, 2024
0a42ae0
Merge pull request #135 from microsoft/dependabot/pip/dependabotchang…
Roopan-Microsoft Dec 26, 2024
c5e9133
build: bump eslint-plugin-prettier from 5.1.3 to 5.2.1 in /frontend
dependabot[bot] Dec 26, 2024
5e62be1
build: bump dompurify and @types/dompurify in /frontend
dependabot[bot] Dec 26, 2024
5efbf40
Merge pull request #149 from microsoft/dependabot/npm_and_yarn/fronte…
Roopan-Microsoft Dec 26, 2024
c977d79
Merge pull request #148 from microsoft/dependabot/npm_and_yarn/fronte…
Roopan-Microsoft Dec 26, 2024
57f095c
build: bump lint-staged from 15.2.9 to 15.2.11 in /frontend
dependabot[bot] Dec 26, 2024
a0756b1
Merge pull request #147 from microsoft/dependabot/npm_and_yarn/fronte…
Roopan-Microsoft Dec 26, 2024
fba6e6e
Merge pull request #146 from microsoft/dependabot/npm_and_yarn/fronte…
Roopan-Microsoft Dec 26, 2024
fdf1d6f
build: bump @eslint/eslintrc from 3.0.2 to 3.2.0 in /frontend
dependabot[bot] Dec 26, 2024
89a406f
build: bump eslint-plugin-react from 7.34.1 to 7.37.3 in /frontend
dependabot[bot] Dec 26, 2024
05aea67
Merge pull request #145 from microsoft/dependabot/npm_and_yarn/fronte…
Roopan-Microsoft Dec 26, 2024
a7cc720
Merge pull request #134 from microsoft/dependabot/npm_and_yarn/fronte…
Roopan-Microsoft Dec 26, 2024
1dce652
Merge pull request #132 from microsoft/dependabot/pip/dependabotchang…
Roopan-Microsoft Dec 26, 2024
928c5b3
Merge pull request #131 from microsoft/dependabot/pip/dependabotchang…
Roopan-Microsoft Dec 26, 2024
283de0b
Merge pull request #130 from microsoft/dependabot/pip/dependabotchang…
Roopan-Microsoft Dec 26, 2024
164546a
build: bump aiohttp from 3.10.5 to 3.11.11
dependabot[bot] Dec 26, 2024
a2de3c5
Merge pull request #128 from microsoft/dependabot/pip/dependabotchang…
Roopan-Microsoft Dec 26, 2024
1288883
build: bump pydantic-settings from 2.2.1 to 2.7.0
dependabot[bot] Dec 26, 2024
d8e8d6b
build: bump quart from 0.19.9 to 0.20.0
dependabot[bot] Dec 26, 2024
fe91f01
build: bump tqdm from 4.66.5 to 4.67.1
dependabot[bot] Dec 26, 2024
9711db1
build: bump pymupdf from 1.24.5 to 1.25.1
dependabot[bot] Dec 26, 2024
775e8aa
build: bump @types/mocha from 10.0.6 to 10.0.10 in /frontend
dependabot[bot] Dec 26, 2024
2202c73
build: bump azure-search-documents from 11.4.0b6 to 11.6.0b8
dependabot[bot] Dec 26, 2024
4c17116
build: bump @fluentui/react-icons from 2.0.247 to 2.0.270 in /frontend
dependabot[bot] Dec 26, 2024
f9d79f6
build: bump @vitejs/plugin-react from 3.1.0 to 4.3.4 in /frontend
dependabot[bot] Dec 26, 2024
0de2138
build: bump eslint-plugin-jsx-a11y from 6.8.0 to 6.10.2 in /frontend
dependabot[bot] Dec 26, 2024
2860960
build: bump @typescript-eslint/eslint-plugin in /frontend
dependabot[bot] Dec 26, 2024
8d11484
build: bump rehype-raw from 6.1.1 to 7.0.0 in /frontend
dependabot[bot] Dec 26, 2024
4b2fc64
build: bump typescript from 4.9.5 to 5.7.2 in /frontend
dependabot[bot] Dec 26, 2024
3818044
build: bump globals from 15.0.0 to 15.14.0 in /frontend
dependabot[bot] Dec 26, 2024
11a8001
Merge pull request #171 from microsoft/dependabot/npm_and_yarn/fronte…
Roopan-Microsoft Dec 26, 2024
2f26821
Merge pull request #170 from microsoft/dependabot/npm_and_yarn/fronte…
Roopan-Microsoft Dec 26, 2024
859724a
Merge pull request #169 from microsoft/dependabot/npm_and_yarn/fronte…
Roopan-Microsoft Dec 26, 2024
eb25d68
Merge pull request #168 from microsoft/dependabot/npm_and_yarn/fronte…
Roopan-Microsoft Dec 26, 2024
c4adcec
Merge pull request #166 from microsoft/dependabot/npm_and_yarn/fronte…
Roopan-Microsoft Dec 26, 2024
d52da41
Merge pull request #167 from microsoft/dependabot/npm_and_yarn/fronte…
Roopan-Microsoft Dec 26, 2024
c4516b7
build: bump react-syntax-highlighter and @types/react-syntax-highlighter
dependabot[bot] Dec 26, 2024
171da03
Merge pull request #164 from microsoft/dependabot/npm_and_yarn/fronte…
Roopan-Microsoft Dec 26, 2024
d1c41f0
Merge pull request #163 from microsoft/dependabot/pip/dependabotchang…
Roopan-Microsoft Dec 26, 2024
78ffc3b
Merge pull request #165 from microsoft/dependabot/npm_and_yarn/fronte…
Roopan-Microsoft Dec 26, 2024
73bd3db
build: bump ts-jest from 29.1.2 to 29.2.5 in /frontend
dependabot[bot] Dec 26, 2024
876efeb
build: bump openai from 1.6.1 to 1.58.1
dependabot[bot] Dec 26, 2024
527018b
Merge pull request #162 from microsoft/dependabot/pip/dependabotchang…
Roopan-Microsoft Dec 26, 2024
e05cfd7
Merge pull request #161 from microsoft/dependabot/npm_and_yarn/fronte…
Roopan-Microsoft Dec 26, 2024
a4de685
Merge pull request #160 from microsoft/dependabot/pip/dependabotchang…
Roopan-Microsoft Dec 26, 2024
e226cec
build: bump python-dotenv from 1.0.0 to 1.0.1
dependabot[bot] Dec 26, 2024
b42746c
build: bump urllib3 from 2.2.2 to 2.3.0
dependabot[bot] Dec 26, 2024
bde6a1d
Merge pull request #159 from microsoft/dependabot/pip/dependabotchang…
Roopan-Microsoft Dec 26, 2024
9baa6b7
Merge pull request #158 from microsoft/dependabot/pip/dependabotchang…
Roopan-Microsoft Dec 26, 2024
b13322f
build: bump pytest from 7.4.0 to 8.3.4
dependabot[bot] Dec 26, 2024
e80668d
Merge pull request #157 from microsoft/dependabot/npm_and_yarn/fronte…
Roopan-Microsoft Dec 26, 2024
beb5b80
Merge pull request #156 from microsoft/dependabot/pip/dependabotchang…
Roopan-Microsoft Dec 26, 2024
c1ea0bd
Merge pull request #155 from microsoft/dependabot/pip/dependabotchang…
Roopan-Microsoft Dec 26, 2024
a25a3a5
Merge pull request #153 from microsoft/dependabot/pip/dependabotchang…
Roopan-Microsoft Dec 26, 2024
d600295
build: bump pytest-asyncio from 0.23.2 to 0.25.0
dependabot[bot] Dec 26, 2024
91d9903
Merge pull request #152 from microsoft/dependabot/pip/dependabotchang…
Roopan-Microsoft Dec 26, 2024
958dcf8
Merge pull request #154 from microsoft/dependabot/pip/dependabotchang…
Roopan-Microsoft Dec 26, 2024
6d7e428
Linting-files
UtkarshMishra-Microsoft Dec 27, 2024
77615a1
lint issue fix
AjitPadhi-Microsoft Dec 27, 2024
558fd00
updated pynlint workflow
AjitPadhi-Microsoft Dec 27, 2024
4e7e827
Merge branch 'main' into dev
Roopan-Microsoft Dec 27, 2024
fda3e2e
Merge pull request #173 from microsoft/files-linting
Roopan-Microsoft Dec 30, 2024
c5f6277
updated code and update package.json file
Rohini-Microsoft Dec 31, 2024
a7be154
Merge pull request #175 from microsoft/dependabotchanges-2
Roopan-Microsoft Jan 1, 2025
6d46ef2
Merge branch 'dev' into dependabotchanges
Prasanjeet-Microsoft Jan 1, 2025
85bbffa
flake 8 pakcage added in requirments.txt
Roopan-Microsoft Jan 2, 2025
7fe2a05
Merge pull request #174 from microsoft/dependabotchanges
Roopan-Microsoft Jan 2, 2025
03d1894
updated package-lock.json
Jan 2, 2025
4c905fb
upadted package_json file
Jan 2, 2025
d2398ea
updated package-lock.json
Jan 2, 2025
90c2d9a
Merge remote-tracking branch 'upstream/main'
Roopan-Microsoft Jan 2, 2025
34dc709
Reverted the unwanted changes
Roopan-Microsoft Jan 2, 2025
47c5190
updated
Roopan-Microsoft Jan 2, 2025
9621cf4
Merge branch 'main' into dev
Roopan-Microsoft Jan 2, 2025
833a628
Merge branch 'dev' into main
Roopan-Microsoft Jan 2, 2025
d84d6e4
Merge pull request #190 from Roopan-Microsoft/main
Roopan-Microsoft Jan 2, 2025
d6f4838
updated package lock json with npm i command
Kiran-Siluveru-Microsoft Jan 6, 2025
0ec816e
removed node 14 from node yml
Kiran-Siluveru-Microsoft Jan 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[flake8]
max-line-length = 120
exclude = .venv, _pycache_, migrations
ignore = E501,F401,F811,F841,E203,E231,W503
max-line-length = 88
extend-ignore = E501
exclude = venv, frontend
ignore = E203, W503
190 changes: 190 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
name: CI-Validate Deployment

on:
push:
branches:
- main
schedule:
- cron: '0 6,18 * * *' # Runs at 6:00 AM and 6:00 PM GMT

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Setup Azure CLI
run: |
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
az --version # Verify installation

- name: Login to Azure
run: |
az login --service-principal -u ${{ secrets.AZURE_CLIENT_ID }} -p ${{ secrets.AZURE_CLIENT_SECRET }} --tenant ${{ secrets.AZURE_TENANT_ID }}

- name: Install Bicep CLI
run: az bicep install

- name: Generate Resource Group Name
id: generate_rg_name
run: |
echo "Generating a unique resource group name..."
TIMESTAMP=$(date +%Y%m%d%H%M%S)
COMMON_PART="pslautomationRes"
UNIQUE_RG_NAME="${COMMON_PART}${TIMESTAMP}"
echo "RESOURCE_GROUP_NAME=${UNIQUE_RG_NAME}" >> $GITHUB_ENV
echo "Generated Resource_GROUP_PREFIX: ${UNIQUE_RG_NAME}"

- name: Check and Create Resource Group
id: check_create_rg
run: |
set -e
echo "Checking if resource group exists..."
rg_exists=$(az group exists --name ${{ env.RESOURCE_GROUP_NAME }})
if [ "$rg_exists" = "false" ]; then
echo "Resource group does not exist. Creating..."
az group create --name ${{ env.RESOURCE_GROUP_NAME }} --location northcentralus || { echo "Error creating resource group"; exit 1; }
else
echo "Resource group already exists."
fi

- name: Generate Unique Solution Prefix
id: generate_solution_prefix
run: |
set -e
COMMON_PART="pslr"
TIMESTAMP=$(date +%s)
UPDATED_TIMESTAMP=$(echo $TIMESTAMP | tail -c 3)
UNIQUE_SOLUTION_PREFIX="${COMMON_PART}${UPDATED_TIMESTAMP}"
echo "SOLUTION_PREFIX=${UNIQUE_SOLUTION_PREFIX}" >> $GITHUB_ENV
echo "Generated SOLUTION_PREFIX: ${UNIQUE_SOLUTION_PREFIX}"

- name: Deploy Bicep Template
id: deploy
run: |
set -e
az deployment group create \
--resource-group ${{ env.RESOURCE_GROUP_NAME }} \
--template-file infrastructure/deployment.json \
--parameters \
HostingPlanName="${{ env.SOLUTION_PREFIX }}-plan" \
ApplicationInsightsName="appins-${{ env.SOLUTION_PREFIX }}" \
WebsiteName="webapp-${{ env.SOLUTION_PREFIX }}" \
CosmosDBName="db-cosmos-${{ env.SOLUTION_PREFIX }}" \
CosmosDBRegion="NorthCentralUS" \
AzureSearchService="search-${{ env.SOLUTION_PREFIX }}" \
AzureOpenAIResource="aoai-${{ env.SOLUTION_PREFIX }}" \
WorkspaceName="worksp-${{ env.SOLUTION_PREFIX }}"

- name: Delete Bicep Deployment
if: success()
run: |
set -e
echo "Checking if resource group exists..."
rg_exists=$(az group exists --name ${{ env.RESOURCE_GROUP_NAME }})
if [ "$rg_exists" = "true" ]; then
echo "Resource group exists. Cleaning..."
az group delete \
--name ${{ env.RESOURCE_GROUP_NAME }} \
--yes \
--no-wait
echo "Resource group deleted... ${{ env.RESOURCE_GROUP_NAME }}"
else
echo "Resource group does not exist."
fi

- name: Wait for Resource Deletion to Complete
run: |
# List of resources to check based on SOLUTION_PREFIX
resources_to_check=(
"aoai-${{ env.SOLUTION_PREFIX }}"
"appins-${{ env.SOLUTION_PREFIX }}"
"db-cosmos-${{ env.SOLUTION_PREFIX }}"
"${{ env.SOLUTION_PREFIX }}-plan"
"search-${{ env.SOLUTION_PREFIX }}"
"webapp-${{ env.SOLUTION_PREFIX }}"
"worksp-${{ env.SOLUTION_PREFIX }}"
)

# Get the list of resources in YAML format
resource_list=$(az resource list --subscription ${{ secrets.AZURE_SUBSCRIPTION_ID }} --output yaml)

# Maximum number of retries and retry intervals
max_retries=3
retry_intervals=(30 60 120)
retries=0

while true; do
resource_found=false
# Iterate through the resources to check
for resource in "${resources_to_check[@]}"; do
echo "Checking resource: $resource"
if echo "$resource_list" | grep -q "name: $resource"; then
echo "Resource '$resource' exists in the subscription."
resource_found=true
else
echo "Resource '$resource' does not exist in the subscription."
fi
done

# If any resource exists, retry
if [ "$resource_found" = true ]; then
retries=$((retries + 1))
if [ "$retries" -ge "$max_retries" ]; then
echo "Maximum retry attempts reached. Exiting."
break
else
echo "Waiting for ${retry_intervals[$retries-1]} seconds before retrying..."
sleep ${retry_intervals[$retries-1]}
fi
else
echo "No resources found. Exiting."
break
fi
done

- name: Purging the Resources
if: success()
run: |
set -e
# Purging resources based on solution prefix
echo "Purging resources..."

# List of resources to purge
resources_to_purge=(
"aoai-${{ env.SOLUTION_PREFIX }}"
"appins-${{ env.SOLUTION_PREFIX }}"
"db-cosmos-${{ env.SOLUTION_PREFIX }}"
"${{ env.SOLUTION_PREFIX }}-plan"
"search-${{ env.SOLUTION_PREFIX }}"
"webapp-${{ env.SOLUTION_PREFIX }}"
"worksp-${{ env.SOLUTION_PREFIX }}"
)

for resource in "${resources_to_purge[@]}"; do
echo "Purging resource: $resource"
if ! az resource delete --ids /subscriptions/${{ secrets.AZURE_SUBSCRIPTION_ID }}/providers/Microsoft.CognitiveServices/locations/uksouth/deletedAccounts/$resource --verbose; then
echo "Failed to purge resource: $resource"
else
echo "Purged the resource: $resource"
fi
done

echo "Resource purging completed successfully"

- name: Send Notification on Failure
if: failure()
run: |
RUN_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"

EMAIL_BODY=$(cat <<EOF
{
"body": "<p>Dear Team,</p><p>We would like to inform you that the Research Assistant Automation process has encountered an issue and has failed to complete successfully.</p><p><strong>Build URL:</strong> ${RUN_URL}<br> ${OUTPUT}</p><p>Please investigate the matter at your earliest convenience.</p><p>Best regards,<br>Your Automation Team</p>"
}
EOF
)

curl -X POST "${{ secrets.LOGIC_APP_URL }}" \
-H "Content-Type: application/json" \
-d "$EMAIL_BODY" || echo "Failed to send notification"
34 changes: 32 additions & 2 deletions .github/workflows/docker-build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
types: [closed]
branches:
- main
- dev
- demo
workflow_dispatch: # Add this line to enable manual triggering

jobs:
Expand All @@ -20,13 +22,41 @@ jobs:
uses: docker/setup-buildx-action@v1

- name: Log in to Azure Container Registry
uses: azure/docker-login@v1
if: ${{ github.ref_name == 'main' }}
uses: azure/docker-login@v2
with:
login-server: ${{ secrets.ACR_LOGIN_SERVER }}
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}

- name: Log in to Azure Container Registry (Dev/Demo)
if: ${{ github.ref_name == 'dev' || github.ref_name == 'demo' }}
uses: azure/docker-login@v2
with:
login-server: ${{ secrets.ACR_DEV_LOGIN_SERVER }}
username: ${{ secrets.ACR_DEV_USERNAME }}
password: ${{ secrets.ACR_DEV_PASSWORD }}

- name: Set Docker image tag
id: docker_tag
run: |
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
echo "TAG=latest" >> $GITHUB_ENV
elif [[ "${{ github.ref }}" == "refs/heads/dev" ]]; then
echo "TAG=dev" >> $GITHUB_ENV
elif [[ "${{ github.ref }}" == "refs/heads/demo" ]]; then
echo "TAG=demo" >> $GITHUB_ENV
fi

- name: Build and push Docker image
if: ${{ github.ref_name == 'main' }}
run: |
docker build -t ${{ secrets.ACR_LOGIN_SERVER }}/webapp:${{ env.TAG }} -f WebApp.Dockerfile .
docker push ${{ secrets.ACR_LOGIN_SERVER }}/webapp:${{ env.TAG }}

- name: Build and push Docker image (Dev/Demo)
if: ${{ github.ref_name == 'dev' || github.ref_name == 'demo' }}
run: |
docker build -t ${{ secrets.ACR_LOGIN_SERVER }}/webapp:latest -f WebApp.Dockerfile .
docker push ${{ secrets.ACR_LOGIN_SERVER }}/webapp:latest
docker push ${{ secrets.ACR_LOGIN_SERVER }}/webapp:latest

2 changes: 1 addition & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
working-directory: frontend
strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 21.x]
node-version: [16.x, 18.x, 21.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
Expand Down
18 changes: 8 additions & 10 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,14 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

# Step 3: Run all code quality checks
- name: Run Code Quality Checks
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
echo "Fixing imports with Isort..."
python -m isort --verbose .
echo "Formatting code with Black..."
python -m black --verbose .
echo "Running Flake8..."
python -m flake8 --config=.flake8 --verbose .
pip install -r requirements-dev.txt

# Step 3: Run all code quality checks
- name: Pylint
run: |
echo "Running Pylint..."
python -m pylint --rcfile=.pylintrc --verbose .
python -m flake8 --config=.flake8 --verbose .

Loading
Loading