Azure Web App Deployment Logs Show Incorrect Link to Azure DevOps Pipeline

DO1 Yauhen Zdanovich 20 Reputation points
2025-02-03T09:30:16.7666667+00:00

I’m experiencing an issue with the deployment logs in Azure Web Apps. The deployment itself works fine, but when I navigate to the Deployment Center in the Azure Portal and click on the link to the Azure DevOps pipeline (to review the build or deployment details), I get a 404 error.

Here are the details of the setup:

Deployment Type:

I’m using a single YAML pipeline in Azure DevOps for both build and release. The deployment tasks include building the app and deploying it directly to the Azure Web App.

Observations:

For apps where I use separate build and release pipelines, the link in the deployment logs works correctly and redirects to the appropriate pipeline. For apps where I deploy using a single YAML pipeline, the link in the deployment logs is incorrect and leads to a “Page not found” error in Azure DevOps.

Here’s a simplified version of the deployment step in my YAML pipeline:

parameters:
  path_to_project: ''  
  net_version: ''
  artifact_name: ''  
  azure_subscription: ''

steps:  

- task: UseDotNet@2
  condition: ne('${{ parameters.net_version }}', 'globalJson')
  inputs:
    version: '${{ parameters.net_version }}'

- task: NuGetAuthenticate@1
  displayName: 'Authenticate to NuGet'

- task: DotNetCoreCLI@2
  displayName: 'Build'
  inputs:
    command: 'build'
    projects: '${{ parameters.path_to_project }}'
    arguments: ''

- task: DotNetCoreCLI@2
  displayName: 'Publish'
  inputs:
    command: 'publish'
    projects: '${{ parameters.path_to_project }}'
    publishWebProjects: false
    arguments: '--output $(Build.ArtifactStagingDirectory)'

- task: PublishBuildArtifacts@1
  displayName: 'Publish Artifact'
  inputs:
    PathtoPublish: '$(Build.ArtifactStagingDirectory)'
    ArtifactName: '${{ parameters.artifact_name }}'

- task: DownloadBuildArtifacts@0
  displayName: 'Download Artifact'
  inputs:
    artifactName: ${{ parameters.artifact_name }}
    downloadPath: '$(System.ArtifactsDirectory)/${{ parameters.artifact_name }}'

- task: AzureWebApp@1
  inputs:
    azureSubscription: ${{ parameters.azure_subscription }} 
    appType: webApp
    appName: ${{ parameters.app_name }}
    package: '$(System.ArtifactsDirectory)/**/*.zip' 
    deploymentMethod: 'auto'

enter image description here

enter image description here

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,243 questions
{count} votes

Your answer

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