question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[AzureRmWebAppDeployment@4] Unable to access output variable AppServiceApplicationUrl

See original GitHub issue

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...>

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:8
  • Comments:17

github_iconTop GitHub Comments

3reactions
heneaultcommented, Jun 21, 2022

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

2reactions
CerosDevcommented, Jun 21, 2022

Same here with version 4.205.13

Read more comments on GitHub >

github_iconTop Results From Across the Web

Not able to deploy .Net6 app to new azure app services
Looks like the AzureRmWebAppDeployment@4 task got a new update (v4.205.13) that doesn't output variables like the AppServiceApplicationUrl.
Read more >
Azure App Service deploy v4 task - Microsoft Learn
This task defines the following output variables, which you can consume in downstream steps, jobs, and stages. AppServiceApplicationUrl
Read more >
Pipelines Release Azure Web App Deploy: Fails to Update ...
I developed a simple Web Api for testing, but cannot get the Azure Web App ... The AppServiceApplicationUrl is a output variable in...
Read more >
Sharing variables between Stages with deployment jobs in ...
If you want to use the output variables from the ARM template as a pipeline variables, you can use the next Powershell script:....
Read more >
Using Terraform output values in Azure DevOps pipeline
Thanks to the output variables of the Terraform task, we are able to get a reference to a file containing the output values...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found