Azure AppService with Django on Linux using Azure Devops for CI takes 20 minutes

I am using Django on Linux with Azure Devops as Continuous Integration / Continuous Development purposes.

I have succesfully setup the yaml file for deployment and associated with Azure AppService which seems to be working ok.

However it takes a long time ( about 20 minutes ), it was a lot faster with other cloud providers ( such as 3-4 minutes )

Here below is my azure-pipelines-prod.yaml file :

# Python to Linux Web App on Azure
# Build your Python project and deploy it to Azure as a Linux Web App.
# Change python version to one thats appropriate for your application.
# https://docs.microsoft.com/azure/devops/pipelines/languages/python

trigger:
- main

variables:
  # Azure Resource Manager connection created during pipeline creation
  azureServiceConnectionId: 'xxxxxxxx-7f93-4dc6-922b-ae9b29311fbf'

  # Web app name
  webAppName: 'project-app'

  # Agent VM image name
  vmImageName: 'ubuntu-latest'

  # Environment name
  environmentName: 'project-app'

  # Project root folder. Point to the folder containing manage.py file.
  projectRoot: $(System.DefaultWorkingDirectory)

  pythonVersion: '3.9'

stages:
- stage: Build
  displayName: Build stage
  jobs:
  - job: BuildJob
    pool:
      vmImage: $(vmImageName)
    steps:
    - task: UsePythonVersion@0
      inputs:
        versionSpec: '$(pythonVersion)'
      displayName: 'Use Python $(pythonVersion)'

    - script: |
        python -m venv antenv
        source antenv/bin/activate
        python -m pip install --upgrade pip
        pip install setup
        pip install --target="./antenv/lib/python3.9/site-packages" -r ./requirements-azure.txt
      workingDirectory: $(projectRoot)
      displayName: "Install requirements"

    - task: ArchiveFiles@2
      displayName: 'Archive files'
      inputs:
        rootFolderOrFile: '$(projectRoot)'
        includeRootFolder: false
        archiveType: zip
        archiveFile: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip
        replaceExistingArchive: true

    - upload: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip
      displayName: 'Upload package'
      artifact: drop

- stage: Deploy
  displayName: 'Deploy Web App'
  dependsOn: Build
  condition: succeeded()
  jobs:
  - deployment: DeploymentJob
    pool:
      vmImage: $(vmImageName)
    environment: $(environmentName)
    strategy:
      runOnce:
        deploy:
          steps:

          - task: UsePythonVersion@0
            inputs:
              versionSpec: '$(pythonVersion)'
            displayName: 'Use Python version'

          - task: AzureWebApp@1
            displayName: 'Deploy Azure Web App : project-app'
            inputs:
              azureSubscription: $(azureServiceConnectionId)
              appName: $(webAppName)
              package: $(Pipeline.Workspace)/drop/$(Build.BuildId).zip

And here below is my AppService environment settings :

[
  {
    "name": "AZURE_CLIENT_ID",
    "value": "xxxxxxx-790e-4de9-9efe-60f046024752",
    "slotSetting": true
  },
  {
    "name": "AZURE_CLIENT_SECRET",
    "value": "XXXXXXXXX~9ezzAV2qI5uDVx8Khc7CMCDXf5mfICFbQN",
    "slotSetting": true
  },
  {
    "name": "DiagnosticServices_EXTENSION_VERSION",
    "value": "disabled",
    "slotSetting": true
  },
  {
    "name": "DISABLE_PHP_BUILD",
    "value": "false",
    "slotSetting": false
  },
  {
    "name": "InstrumentationEngine_EXTENSION_VERSION",
    "value": "disabled",
    "slotSetting": true
  },
  {
    "name": "PORT",
    "value": "8000",
    "slotSetting": true
  },
  {
    "name": "SnapshotDebugger_EXTENSION_VERSION",
    "value": "disabled",
    "slotSetting": true
  },
  {
    "name": "WEBSITE_HTTPLOGGING_RETENTION_DAYS",
    "value": "3",
    "slotSetting": false
  },
  {
    "name": "WEBSITE_WEBDEPLOY_USE_SCM",
    "value": "true",
    "slotSetting": true
  },
  {
    "name": "WEBSITES_CONTAINER_START_TIME_LIMIT",
    "value": "1000",
    "slotSetting": false
  },
  {
    "name": "WEBSITES_PORT",
    "value": "8000",
    "slotSetting": true
  },
  {
    "name": "XDT_MicrosoftApplicationInsights_BaseExtensions",
    "value": "disabled",
    "slotSetting": true
  },
  {
    "name": "XDT_MicrosoftApplicationInsights_Mode",
    "value": "default",
    "slotSetting": true
  },
  {
    "name": "XDT_MicrosoftApplicationInsights_PreemptSdk",
    "value": "disabled",
    "slotSetting": true
  }
]

Whenever I make a commit to the main branch that is defined in azure-pipeline-prod, it triggers a build, and the build zip is then loaded onto AppService. However, it is really very slow, and consumes monthly 1800 parallel build minutes that is granted by Azure Subscription. The zip file is about 1Mbyte and the artifact with all django packages is about 170 Mbytes as seen below :

Physical Content Uploaded: 147.7 MB
Logical Content Uploaded: 154.9 MB
Compression Saved: 7.2 MB
Deduplication Saved: 181.2 MB
Number of Chunks Uploaded: 127
Total Number of Chunks: 409

I am open to any suggestions, in order to make it more stable (the build sometimes fails) and a lot more faster.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật