• /
  • EnglishEspañol日本語한국어Português
  • Log inStart now

Azure Web Apps Troubleshooting: Issue with Azure Pipelines

Problem

For Azure web apps using the NewRelic.Azure.WebSites.Extension, and deployed with Azure Pipelines, the newrelic directories are deleted, so no instrumentation occurs. Further attempts to deploy using the Azure Pipeline indicate that the NewRelic.Azure.WebSites.Extension is already installed, so the extension cannot be re-installed using the Azure Pipeline.

Solution

To control newrelic folder retention, use the following options for WebDeploy:

Basic solutions

Comments

Enable skipAction=Delete WebDeploy arguments.

Explicitly exclude specific folders from deletion, such as the newrelic folders, with the following:

Azure Pipelines UI:

Add these arguments to the Azure App Service deploy -> Additional Deployment Options -> Additional Arguments

-skip:skipAction=Delete,objectName=dirPath,absolutePath='newrelic$' -skip:skipAction=Delete,objectName=dirPath,absolutePath='newrelic_core$'

OR

Pipeline.yml file:

add the following input to the WebDeploy task:

AdditionalArguments: '-skip:skipAction=Delete,objectName=dirPath,absolutePath=''newrelic$'' -skip:skipAction=Delete,objectName=dirPath,absolutePath=''newrelic_core$'''

Note the escaped single quotes.

Screenshot showing skipAction

Cause

If the Remove additional files at destination option is selected for the AzureRmWebAppDeployment task in the Azure Pipeline, the newrelic and newrelic_core directories are deleted from wwwroot, but the extension is not considered uninstalled by Azure. As a result, the next time the pipeline runs and attempts to install the extension, the pipeline displays the message Extension 'NewRelic.Azure.WebSites.Extension' already installed. The extension cannot run without its folders, and Azure will not re-install it because it considers it still installed.

Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.