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.

AzureWebAppContainerV1 hidden param ends up being used

See original GitHub issue

Required Information

Entering this information will route you directly to the right team and expedite traction.

Question, Bug, or Feature?
Type: Bug

Enter Task Name: AzureWebAppContainerV1

list here (V# not needed):
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks

Environment

Agent name: ‘Hosted Agent’ 2020-05-21T09:44:22.7790423Z Agent machine name: ‘WIN-IP8NBLIKQOR’ 2020-05-21T09:44:22.7790754Z Current agent version: ‘2.168.2’ 2020-05-21T09:44:22.7809491Z Current image version: ‘20200517.1’ 2020-05-21T09:44:22.7815809Z Agent running as: ‘VssAdministrator’ 2020-05-21T09:44:22.7824139Z Prepare release directory. 2020-05-21T09:44:22.7830742Z ReleaseId=767, TeamProjectId=6334dd50-2591-41b3-8764-746de9f071eb, ReleaseDefinitionName=Uniun Website

Issue Description

Task Info:

2020-05-21T09:44:25.0695397Z ============================================================================== 2020-05-21T09:44:25.0696201Z Task : Azure Web App for Containers 2020-05-21T09:44:25.0696794Z Description : Deploy containers to Azure App Service 2020-05-21T09:44:25.0697175Z Version : 1.163.5 2020-05-21T09:44:25.0697674Z Author : Microsoft Corporation 2020-05-21T09:44:25.0698253Z Help : https://aka.ms/azurewebappcontainertroubleshooting 2020-05-21T09:44:25.0698727Z ==============================================================================

Problem: I am seeing my release pipeline fail during deployment, when executing this task. However the error log looks odd, because it is trying to get authorization to a scope name, with a variable in the scope name: $(env_resource_group) and failing - and that variable happens to be one that used to be a variable in my pipeline (but is not any longer).

image

If I look at the yaml view of this task on the release pipeline - this shows the values I am executing it with:

variables:
  docker_registry_name: 'labdocker.azurecr.io'
  docker_image_repository_name: 'uniun/uniun'
  semver: '$(Build.BuildNumber)'

steps:
- task: AzureWebAppContainer@1
  displayName: 'Deploy docker image'
  inputs:
    azureSubscription: 'ARM Staging'
    appName: 'uniun-staging'
    containers: '$(docker_registry_name)/$(docker_image_repository_name):$(semver)'

So I am unsure as to why it still fails trying to access a scope with variable “$(env_resource_group)” reported in the scope name, which is ofcourse invalid.

Task logs

[Enable debug logging and please provide the zip file containing all the logs for a speedy resolution]

  • If i run the release with system.debug true variable, do I need to sanitise the log output before upload here?

Troubleshooting

Checkout how to troubleshoot failures and collect debug logs: https://docs.microsoft.com/en-us/vsts/build-release/actions/troubleshooting

FYI This link had a lot of stuff which only related to yaml pipelines and was hard to tell how to do this for classic release pipelines, but I did eventually find mention of system.debug variable, but not sure how to sanitise logs. Would be great if there was a dedicated link for each scenario.

Error logs

[Insert error from the logs here for a quick overview]

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
AmrutaKawadecommented, Nov 3, 2020

This is fixed and will be deployed within 2 weeks.

0reactions
20shivangicommented, Sep 10, 2020

@dazinator You can unblock yourself by clearing the value from resource group and then tick the checkbox. Meanwhile, we will look into the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Set secret variables - Azure Pipelines | Microsoft Learn
Secret variables are encrypted variables that you can use in pipelines ... The value of SecretOne is foo and the value of SecretTwo...
Read more >
Secret Pipeline Parameter in Azure Devops - Stack Overflow
I found a workaround so far as I declared a variable as a secret and update this variable before each run. But that's...
Read more >
Azure DevOps: Extends Template with Build and Deployment ...
The approach is to use a steps template for the build where we want the ... secret-scanning/sample-deployment-job.yml@templates parameters: ...
Read more >
Understanding Azure DevOps Variables [Complete Guide]
How do I use Azure DevOps build Pipeline variables in a PowerShell ... areas but ultimately ends up with the value defined in...
Read more >
Task vs. ClusterTask - Tekton
Specifying Parameters; Specifying Resources; Specifying Workspaces ... Specifies a Container step definition to use as the basis for all Steps in the Task ......
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