• /
  • ログイン

Azure Pipelines wipes out NewRelic.Azure.WebSites.Extension directories

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 © 2020 New Relic Inc.