Error in SCM and ORYX in build and deploy a CI/CD using the Templates for Python in Github Workflow

Dario Castellon 5 Reputation points
2025-10-15T15:28:39.9666667+00:00

I'm using the method from Azure documentation: https://free.blessedness.top/en-us/azure/azure-functions/functions-how-to-github-actions?tabs=linux%2Cpython&pivots=method-template

My app is a dummy app in python 3.12 just to check the pipeline building. I use the .yml from the template provided by azure.

I get this error:

Successfully parsed SCM credential from publish-profile format.

Using SCM credential for authentication, GitHub Action will not perform resource validation.

Successfully acquired app settings from function app (with SCM credential)!

Will archive . into /home/runner/work/_temp/temp_web_package_8123595537315715.zip as function app content

Will use Kudu https://<scmsite>/api/zipdeploy to deploy since publish-profile is detected.

Setting SCM_DO_BUILD_DURING_DEPLOYMENT in Kudu container to true

Update using context.kuduService.updateAppSettingViaKudu

Response with status code 405

App setting SCM_DO_BUILD_DURING_DEPLOYMENT has not been propagated to Kudu container yet, remaining retry 19

App setting SCM_DO_BUILD_DURING_DEPLOYMENT has not been propagated to Kudu container yet, remaining retry 18

App setting SCM_DO_BUILD_DURING_DEPLOYMENT has not been propagated to Kudu container yet, remaining retry 17

App setting SCM_DO_BUILD_DURING_DEPLOYMENT has not been propagated to Kudu container yet, remaining retry 16

App setting SCM_DO_BUILD_DURING_DEPLOYMENT has not been propagated to Kudu container yet, remaining retry 15

App setting SCM_DO_BUILD_DURING_DEPLOYMENT has not been propagated to Kudu container yet, remaining retry 14

App setting SCM_DO_BUILD_DURING_DEPLOYMENT has not been propagated to Kudu container yet, remaining retry 13

App setting SCM_DO_BUILD_DURING_DEPLOYMENT has not been propagated to Kudu container yet, remaining retry 12

App setting SCM_DO_BUILD_DURING_DEPLOYMENT has not been propagated to Kudu container yet, remaining retry 11

App setting SCM_DO_BUILD_DURING_DEPLOYMENT has not been propagated to Kudu container yet, remaining retry 10

App setting SCM_DO_BUILD_DURING_DEPLOYMENT has not been propagated to Kudu container yet, remaining retry 9

App setting SCM_DO_BUILD_DURING_DEPLOYMENT has not been propagated to Kudu container yet, remaining retry 8

App setting SCM_DO_BUILD_DURING_DEPLOYMENT has not been propagated to Kudu container yet, remaining retry 7

App setting SCM_DO_BUILD_DURING_DEPLOYMENT has not been propagated to Kudu container yet, remaining retry 6

App setting SCM_DO_BUILD_DURING_DEPLOYMENT has not been propagated to Kudu container yet, remaining retry 5

App setting SCM_DO_BUILD_DURING_DEPLOYMENT has not been propagated to Kudu container yet, remaining retry 4

App setting SCM_DO_BUILD_DURING_DEPLOYMENT has not been propagated to Kudu container yet, remaining retry 3

App setting SCM_DO_BUILD_DURING_DEPLOYMENT has not been propagated to Kudu container yet, remaining retry 2

App setting SCM_DO_BUILD_DURING_DEPLOYMENT has not been propagated to Kudu container yet, remaining retry 1

App setting SCM_DO_BUILD_DURING_DEPLOYMENT has not been propagated to Kudu container yet, remaining retry 0

Warning: App setting SCM_DO_BUILD_DURING_DEPLOYMENT fails to propagate to Kudu container

Setting ENABLE_ORYX_BUILD in Kudu container to true

Update using context.kuduService.updateAppSettingViaKudu

Response with status code 405

App setting ENABLE_ORYX_BUILD has not been propagated to Kudu container yet, remaining retry 19

App setting ENABLE_ORYX_BUILD has not been propagated to Kudu container yet, remaining retry 18

App setting ENABLE_ORYX_BUILD has not been propagated to Kudu container yet, remaining retry 17

App setting ENABLE_ORYX_BUILD has not been propagated to Kudu container yet, remaining retry 16

App setting ENABLE_ORYX_BUILD has not been propagated to Kudu container yet, remaining retry 15

App setting ENABLE_ORYX_BUILD has not been propagated to Kudu container yet, remaining retry 14

App setting ENABLE_ORYX_BUILD has not been propagated to Kudu container yet, remaining retry 13

App setting ENABLE_ORYX_BUILD has not been propagated to Kudu container yet, remaining retry 12

App setting ENABLE_ORYX_BUILD has not been propagated to Kudu container yet, remaining retry 11

App setting ENABLE_ORYX_BUILD has not been propagated to Kudu container yet, remaining retry 10

App setting ENABLE_ORYX_BUILD has not been propagated to Kudu container yet, remaining retry 9

App setting ENABLE_ORYX_BUILD has not been propagated to Kudu container yet, remaining retry 8

App setting ENABLE_ORYX_BUILD has not been propagated to Kudu container yet, remaining retry 7

App setting ENABLE_ORYX_BUILD has not been propagated to Kudu container yet, remaining retry 6

App setting ENABLE_ORYX_BUILD has not been propagated to Kudu container yet, remaining retry 5

App setting ENABLE_ORYX_BUILD has not been propagated to Kudu container yet, remaining retry 4

App setting ENABLE_ORYX_BUILD has not been propagated to Kudu container yet, remaining retry 3

App setting ENABLE_ORYX_BUILD has not been propagated to Kudu container yet, remaining retry 2

App setting ENABLE_ORYX_BUILD has not been propagated to Kudu container yet, remaining retry 1

App setting ENABLE_ORYX_BUILD has not been propagated to Kudu container yet, remaining retry 0

Warning: App setting ENABLE_ORYX_BUILD fails to propagate to Kudu container

Package deployment using ZIP Deploy initiated.

Error: Failed to deploy web package to App Service.

Error: Execution Exception (state: PublishContent) (step: Invocation)

Error: When request Azure resource at PublishContent, zipDeploy : Failed to use /home/runner/work/_temp/temp_web_package_8123595537315715.zip as ZipDeploy content

Error: Failed to deploy web package to App Service.

Not Found (CODE: 404)

Error: Error: Failed to deploy web package to App Service.

Not Found (CODE: 404)

at Kudu.<anonymous> (/home/runner/work/_actions/Azure/functions-action/v1/lib/appservice-rest/Kudu/azure-app-kudu-service.js:238:41)

at Generator.next (<anonymous>)

at fulfilled (/home/runner/work/_actions/Azure/functions-action/v1/lib/appservice-rest/Kudu/azure-app-kudu-service.js:5:58)

at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Error: Deployment Failed!

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
{count} votes

2 answers

Sort by: Most helpful
  1. Pravallika KV 165 Reputation points Microsoft External Staff Moderator
    2025-10-16T17:27:49.64+00:00

    Hi Dario Castellon,

    Thank you reaching out to Microsoft Q&A.

    I faced the same issue when deploying a function to a Function App on the Flex Consumption plan using GitHub Actions.

    image

    • Are you using Flex Consumption plan?

    If yes, make sure to add below set of parameters in your generated GitHub yaml file:

    
    		sku: 'flexconsumption'
    
            remote-build: true
    
    

    Example:

    
          with:
    
            app-name: ${{ env.AZURE_FUNCTIONAPP_NAME }}
    
            package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
    
            sku: 'flexconsumption'
    
            remote-build: true
    
            publish-profile: ${{ secrets.AZURE_FUNCTIONAPP_PUBLISH_PROFILE }} # Remove publish-profile to use Azure RBAC
    
            scm-do-build-during-deployment: true
    
            enable-oryx-build: true
    
    

    I have followed the same steps and MSDOC and I could deploy the function to Azure.

    image

    • If your function App is created using Consumption/Elastic Premium/ and App Service (Dedicated) plans, below parameters are mandatory in yml file:
    
            scm-do-build-during-deployment: true
    
            enable-oryx-build: true
    
    

    Example:

    
          with:
    
            app-name: ${{ env.AZURE_FUNCTIONAPP_NAME }}
    
            package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
    
            publish-profile: ${{ secrets.AZURE_FUNCTIONAPP_PUBLISH_PROFILE }} # Remove publish-profile to use Azure RBAC
    
            scm-do-build-during-deployment: true
    
            enable-oryx-build: true
    
    
    • Update the environment variables as below in generated GitHub workflow:
    
    env:
    
      AZURE_FUNCTIONAPP_NAME: 'App_Name'   # set this to your function app name on Azure
    
      AZURE_FUNCTIONAPP_PACKAGE_PATH: '.'       # set this to the path to your function app project, defaults to the repository root
    
      PYTHON_VERSION: '3.12'                     # set this to the python version to use (e.g. '3.6', '3.7', '3.8')
    
    
    

    Portal:

    User's image

    Hope it helps!


    Please do not forget to click "Accept the answer” and Yes, this can be beneficial to other community members.

    User's image

    If you have any other questions, let me know in the "comments" and I would be happy to help you.


  2. Dario Castellon 5 Reputation points
    2025-10-22T10:25:26.04+00:00

    Thanks for the help.

    I have a walk through by using the Azure CLI in the workflow instead of letting the oryx to build and deploy the function. This sample workflow worked for solving the issue:

    
    name: Deploy to Azure Functions Flex Consumption
    
    on:
      push:
        branches:
          - template
      workflow_dispatch:
    
    env:
      AZURE_FUNCTIONAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root
      PYTHON_VERSION: '3.12' # set this to the python version to use (supports 3.6, 3.7, 3.8)
    
    jobs:
      build-and-deploy:
        runs-on: ubuntu-latest
        permissions:
          contents: read #This is required for actions/checkout
          id-token: write #This is required for requesting the JWT
        steps:
          - name: Checkout code
            uses: actions/checkout@v4
    
          - name: Set up Python
            uses: actions/setup-python@v4
            with:
              python-version: ${{ env.PYTHON_VERSION }}
    
          - name: Login to Azure
            uses: azure/login@v2
            with:
              client-id: ${{ secrets.<your client> }}
              tenant-id: ${{ secrets.<your tenant> }}
              subscription-id: ${{ secrets.<your subscription> }}
              
          - name: Create and start virtual environment
            run: |
              python -m venv venv
              source venv/bin/activate
    
          - name: Install dependencies
            run: |
              python -m pip install --upgrade pip
              pip install -r requirements.txt --target=".python_packages/lib/site-packages"
    
          - name: Archive function app
            run: |
              zip -r functionapp.zip .
    
          - name: Deploy to Azure Functions (Flex Consumption)        
            uses: azure/cli@v2
            with:
              inlineScript: |
                az functionapp deployment source config-zip \
                  --resource-group <your_rg>\
                  --name  <your_app>\
                  --src functionapp.zip
    
    
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.