Wednesday, November 3, 2021

GitHub Actions - Azure Function Apps zip deployment - ERROR: 'str' object has no attribute 'value'

Panic stations! My GitHub Action workflows are breaking!

 

A recent release has been causing a lot of frustration so this is a quick post to hopefully broadcast a temporary workaround.

 

The error is with Azure Function App zip deployment.

 

 

 

az functionapp deployment source config-zip

 

 

 

 

The workaround is to downgrade the cli version to 2.28.0. This slows down the pipeline considerably, but works. You can see the impact to my workflow below:

JeffreyChilberto_0-1635974669325.png

The yaml will remove the current version and install 2.28.0 and is shown below.

 

 

 

 

      - name: Install az 2.28.0
        shell: powershell
        run: |
          (Get-WmiObject Win32_Product -Filter "Caption='Microsoft Azure CLI'").Uninstall()
          Install-Binary -Url "https://azcliprod.blob.core.windows.net/msi/azure-cli-2.28.0.msi" -Name "azure-cli.msi" -ArgumentList ("/qn", "/norestart")

 

 

 

 

 

The real credit for this workaround goes to the GitHub community. Hard to say who suggested the workaround first.

Issues · Azure/azure-cli (github.com)
Unable to zip deploy a function app in the Azure Cloud Shell (version 2.29.0) · Issue #19954 · Azure/azure-cli (github.com)

This post will hopefully save someone out there frustration until the fix is available. 

 

Cheers!

 

 

Posted at https://sl.advdat.com/3BUzWwp