From f38ed61d3383224deb5300a13d5887692160593f Mon Sep 17 00:00:00 2001 From: kyathi-lekkala0404 Date: Wed, 11 Mar 2026 17:01:19 +0530 Subject: [PATCH 1/3] Update requirements.txt --- requirements.txt | 52 ++++++++++++++++++------------------------------ 1 file changed, 19 insertions(+), 33 deletions(-) diff --git a/requirements.txt b/requirements.txt index df94cccfd..15760113f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,33 +1,19 @@ -alembic==1.4.0 -azure-common==1.1.24 -azure-nspkg==3.0.2 -azure-storage==0.36.0 -certifi==2019.11.28 -cffi==1.14.6 -chardet==3.0.4 -Click==7.1.2 -cryptography==2.8 -Flask==2.0.3 -Flask-Login==0.5.0 -Flask-Session==0.4.0 -Flask-SQLAlchemy==2.5.1 -Flask-WTF==0.14.3 -idna==2.8 -itsdangerous==2.0.1 -Jinja2==3.0.1 -Mako==1.1.1 -MarkupSafe==2.0.1 -msal==1.13.0 -pip==10.0.1 -pycparser==2.20 -pyodbc==5.2.0 -pyopenssl==19.1.0 -python-dateutil==2.8.1 -python-editor==1.0.4 -requests==2.22.0 -setuptools==39.0.1 -six==1.14.0 -SQLAlchemy==1.3.13 -urllib3==1.25.8 -Werkzeug==2.0.3 -WTForms==2.2.1 +Flask==2.2.5 +Flask-Login==0.6.3 +Flask-Session==0.5.0 +Flask-SQLAlchemy==3.0.5 +Flask-WTF==1.2.1 +SQLAlchemy==1.4.52 +WTForms==3.1.2 +alembic==1.13.1 +azure-storage-blob==12.19.1 +msal==1.28.0 +pyodbc==5.1.0 +requests==2.31.0 +python-dateutil==2.8.2 +cryptography==42.0.5 +Werkzeug==2.2.3 +Jinja2==3.1.3 +MarkupSafe==2.1.5 +itsdangerous==2.1.2 +cachelib==0.13.0 From 45d2a67949eaa1f616aef9d8481a5bcc3cf93a1c Mon Sep 17 00:00:00 2001 From: kyathi-lekkala0404 Date: Wed, 11 Mar 2026 17:02:42 +0530 Subject: [PATCH 2/3] Add or update the Azure App Service build and deployment workflow config --- .github/workflows/patch-6_cmsapp.yml | 76 ++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 .github/workflows/patch-6_cmsapp.yml diff --git a/.github/workflows/patch-6_cmsapp.yml b/.github/workflows/patch-6_cmsapp.yml new file mode 100644 index 000000000..2c9e93d3c --- /dev/null +++ b/.github/workflows/patch-6_cmsapp.yml @@ -0,0 +1,76 @@ +# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy +# More GitHub Actions for Azure: https://github.com/Azure/actions +# More info on Python, GitHub Actions, and Azure App Service: https://aka.ms/python-webapps-actions + +name: Build and deploy Python app to Azure Web App - cmsapp + +on: + push: + branches: + - patch-6 + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read #This is required for actions/checkout + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python version + uses: actions/setup-python@v5 + with: + python-version: '3.10' + + # 🛠️ Local Build Section (Optional) + # The following section in your workflow is designed to catch build issues early on the client side, before deployment. This can be helpful for debugging and validation. However, if this step significantly increases deployment time and early detection is not critical for your workflow, you may remove this section to streamline the deployment process. + - name: Create and Start virtual environment and Install dependencies + run: | + python -m venv antenv + source antenv/bin/activate + pip install -r requirements.txt + + # By default, when you enable GitHub CI/CD integration through the Azure portal, the platform automatically sets the SCM_DO_BUILD_DURING_DEPLOYMENT application setting to true. This triggers the use of Oryx, a build engine that handles application compilation and dependency installation (e.g., pip install) directly on the platform during deployment. Hence, we exclude the antenv virtual environment directory from the deployment artifact to reduce the payload size. + - name: Upload artifact for deployment jobs + uses: actions/upload-artifact@v4 + with: + name: python-app + path: | + . + !antenv/ + + # 🚫 Opting Out of Oryx Build + # If you prefer to disable the Oryx build process during deployment, follow these steps: + # 1. Remove the SCM_DO_BUILD_DURING_DEPLOYMENT app setting from your Azure App Service Environment variables. + # 2. Refer to sample workflows for alternative deployment strategies: https://github.com/Azure/actions-workflow-samples/tree/master/AppService + + + deploy: + runs-on: ubuntu-latest + needs: build + permissions: + id-token: write #This is required for requesting the JWT + contents: read #This is required for actions/checkout + + steps: + - name: Download artifact from build job + uses: actions/download-artifact@v4 + with: + name: python-app + + - name: Login to Azure + uses: azure/login@v2 + with: + client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_CC7870D0B1AE48B294CC749333812166 }} + tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_94D43843E7824E3D8CDBE6B8251F8DE4 }} + subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_5BD16551C87E438692DE2D4E3A291E6E }} + + - name: 'Deploy to Azure Web App' + uses: azure/webapps-deploy@v3 + id: deploy-to-webapp + with: + app-name: 'cmsapp' + slot-name: 'Production' + \ No newline at end of file From 773d6216043569d2a77baf8809343b4c87f504b8 Mon Sep 17 00:00:00 2001 From: kyathi-lekkala0404 Date: Wed, 11 Mar 2026 18:02:06 +0530 Subject: [PATCH 3/3] Add or update the Azure App Service build and deployment workflow config --- .github/workflows/patch-6_cmsapp.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/patch-6_cmsapp.yml b/.github/workflows/patch-6_cmsapp.yml index 2c9e93d3c..d8878ab1f 100644 --- a/.github/workflows/patch-6_cmsapp.yml +++ b/.github/workflows/patch-6_cmsapp.yml @@ -63,9 +63,9 @@ jobs: - name: Login to Azure uses: azure/login@v2 with: - client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_CC7870D0B1AE48B294CC749333812166 }} - tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_94D43843E7824E3D8CDBE6B8251F8DE4 }} - subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_5BD16551C87E438692DE2D4E3A291E6E }} + client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_32FE399A68F94263B503E7163B6D41C0 }} + tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_7AEB7A9BC3C94F6B843C930F22C16C1C }} + subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_A5CF136B18AD4FFC9D30E83578CC8979 }} - name: 'Deploy to Azure Web App' uses: azure/webapps-deploy@v3