diff --git a/Tasks/AzureAppServiceManage/operations/KuduServiceUtils.ts b/Tasks/AzureAppServiceManage/operations/KuduServiceUtils.ts index fa8e41cd57aa..3889b8ad4816 100644 --- a/Tasks/AzureAppServiceManage/operations/KuduServiceUtils.ts +++ b/Tasks/AzureAppServiceManage/operations/KuduServiceUtils.ts @@ -2,6 +2,7 @@ import tl = require('vsts-task-lib/task'); import Q = require('q'); import { Kudu } from 'azure-arm-rest/azure-arm-app-service-kudu'; import webClient = require('azure-arm-rest/webClient'); +const pythonExtensionPrefix: string = "azureappservice-"; export class KuduServiceUtils { private _appServiceKuduService: Kudu; @@ -52,8 +53,10 @@ export class KuduServiceUtils { for(var extensionID of extensionList) { var siteExtensionDetails = null; - if(siteExtensionMap[extensionID]) { - siteExtensionDetails = siteExtensionMap[extensionID]; + + // Python extensions are moved to Nuget and the extensions IDs are changed. The belo check ensures that old extensions are mapped to new extension ID. + if(siteExtensionMap[extensionID] || (extensionID.startsWith('python') && siteExtensionMap[pythonExtensionPrefix + extensionID])) { + siteExtensionDetails = siteExtensionMap[extensionID] || siteExtensionMap[pythonExtensionPrefix + extensionID]; console.log(tl.loc('ExtensionAlreadyInstalled', extensionID)); } else { @@ -123,7 +126,7 @@ export class KuduServiceUtils { } private _getExtensionLocalPath(extensionInfo: JSON): string { - var extensionId: string = extensionInfo['id']; + var extensionId: string = extensionInfo['id'].replace(pythonExtensionPrefix, ""); var homeDir = "D:\\home\\"; if(extensionId.startsWith('python2')) { diff --git a/Tasks/AzureAppServiceManage/task.json b/Tasks/AzureAppServiceManage/task.json index 59bc10c2e047..f8290b3ceaa2 100644 --- a/Tasks/AzureAppServiceManage/task.json +++ b/Tasks/AzureAppServiceManage/task.json @@ -17,7 +17,7 @@ "version": { "Major": 0, "Minor": 2, - "Patch": 25 + "Patch": 27 }, "minimumAgentVersion": "1.102.0", "instanceNameFormat": "$(Action): $(WebAppName)", diff --git a/Tasks/AzureAppServiceManage/task.loc.json b/Tasks/AzureAppServiceManage/task.loc.json index 3190fec9970b..5ec798d5d030 100644 --- a/Tasks/AzureAppServiceManage/task.loc.json +++ b/Tasks/AzureAppServiceManage/task.loc.json @@ -17,7 +17,7 @@ "version": { "Major": 0, "Minor": 2, - "Patch": 25 + "Patch": 27 }, "minimumAgentVersion": "1.102.0", "instanceNameFormat": "ms-resource:loc.instanceNameFormat",