azure-pipelines-tasks: [AzureRmWebAppDeployment@4] Unable to access output variable AppServiceApplicationUrl

If you have an issue or request for the Azure Pipelines service, use developer community instead: https://developercommunity.visualstudio.com/spaces/21/index.html )

Hello, Sorry, I am not sure if this is the right place to report our issue. Feel free to point me in the other direction.

Required Information

Question, Bug, or Feature?
Type: Appears to be a bug.

Enter Task Name: AzureRmWebAppDeployment@4

Environment

  • Server - Azure Pipelines or TFS on-premises? Azure Pipelines

  • If using Azure Pipelines, provide the account name, team project name, build definition name/build number:

Sorry, don’t want to put organizational details in the public 😦

  • Agent - Hosted or Private: It’s fully hosted in Azure DevOps as part of a paid subscription.

Issue Description

We have been using the AppServiceApplicationUrl output variable property of the AzureRmWebAppDeployment@4 task in a different Bash task. This has worked for a few years up to 2022-Jun-15. But stopped working the next day. The logs suggest the AzureRmWebAppDeployment@4 task is not setting any output any more. This means the variable reference for AppServiceApplicationUrl no longer works in the subsequent task.

Sample YAML snippet:

          <...snip...>
          - task: AzureRmWebAppDeployment@4
            displayName: 'Azure App Service Deploy: Setup update run'
            name: update_foo
            inputs:
              azureSubscription: $(webapp_service_connection)
              ResourceGroupName: $(webapp_resource_group)
              appType: webAppContainer
              WebAppName: $(webapp)
              SlotName: $(webapp_slot)
              deployToSlotOrASE: true
              DockerNamespace: $(docker_registry_server)
              DockerRepository: $(docker_container_repo)
              DockerImageTag: $(docker_image_tag)
              StartupCommand: '/bin/bash /path/to/our/custom/update/script.sh'
              AppSettings: -OUR_ENV_TYPE $(webapp_env_type)
          <...snip...>
          - task: Bash@3
            displayName: 'Curl: Wake up the Webapp'
            name: wakeup
            inputs:
              targetType: inline
              script: sleep 10; curl $(update_foo.AppServiceApplicationUrl)/path/to/a/page
              timeoutInMinutes: 5

It’s the $(update_foo.AppServiceApplicationUrl) part in the Bash task that no longer resolves.

Task logs

The following log snippet is from a successful run when all was fine. I have redacted URLs etc.

<...snip...>
022-06-15T15:32:33.7048080Z ##[debug]Correlation ID from ARM api call response : 57c82e72-696d-4e61-a086-2965142edfef
2022-06-15T15:32:33.7114831Z App Service Application URL: https://our-site-name.azurewebsites.net
2022-06-15T15:32:33.7117820Z ##[debug]set AppServiceApplicationUrl=https://our-site-name.azurewebsites.net
2022-06-15T15:32:33.7127030Z ##[debug]Processed: ##vso[task.setvariable variable=AppServiceApplicationUrl;isOutput=false;issecret=false;]https://our-site-name.azurewebsites.net
2022-06-15T15:32:33.7128418Z ##[debug]Deployment Succeded
2022-06-15T15:32:33.7173865Z ##[section]Finishing: Azure App Service Deploy: Setup update run
<...snip...>

The same portion now looks like this:

<...snip...>
2022-06-17T09:33:41.7896425Z ##[debug]Correlation ID from ARM api call response : 5491d324-409e-4d43-9c17-0f84e9a07d5f
2022-06-17T09:33:41.7897248Z ##[debug]No changes in metadata properties, skipping update.
2022-06-17T09:33:41.7897988Z ##[debug]Deployment Succeded
2022-06-17T09:33:41.7908907Z ##[section]Finishing: Azure App Service Deploy: Setup update run
<...snip...>

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 8
  • Comments: 17 (1 by maintainers)

Most upvoted comments

could that be that new condition that prevent the update https://github.com/microsoft/azure-pipelines-tasks/blob/b1539a15241a4b59bf1b11d45f27f957fe41d060/Tasks/AzureRmWebAppDeploymentV4/azurermwebappdeployment.ts#L31 If isDeploymentSuccess is true, UpdateDeploymentStatus will not be called

Same here with version 4.205.13

@v-nagarajku: Rollbacking to 4.198.0 wasn’t a good solution… Now the problem is there again with version 4.208.0 and nobody changed the problematic line: https://github.com/microsoft/azure-pipelines-tasks/blob/b1539a15241a4b59bf1b11d45f27f957fe41d060/Tasks/AzureRmWebAppDeploymentV4/azurermwebappdeployment.ts#L31

Hi all, the task version has been rolled back to 4.198.0 and it should work fine as before!

Ditto as well - Version 4.205.13