Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python extension path fix - Azure App Service Manage Task m132 #7048

Merged
merged 6 commits into from
Apr 23, 2018
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions Tasks/AzureAppServiceManage/operations/KuduServiceUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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')) {
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureAppServiceManage/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"version": {
"Major": 0,
"Minor": 2,
"Patch": 25
"Patch": 28
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be lesser than 28. Otherwise next update might be missed

},
"minimumAgentVersion": "1.102.0",
"instanceNameFormat": "$(Action): $(WebAppName)",
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureAppServiceManage/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"version": {
"Major": 0,
"Minor": 2,
"Patch": 25
"Patch": 28
},
"minimumAgentVersion": "1.102.0",
"instanceNameFormat": "ms-resource:loc.instanceNameFormat",
Expand Down