-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Azure App service Manage & Deploy Task Spec changes #4125
Merged
+702
−307
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
0cf2859
Post deployment script logic changed
vincent1173 3f4a15f
added await for waitForAppServiceToStart()
vincent1173 6a8d626
Fix - 2
vincent1173 360cca0
addressed review comments
vincent1173 8c5c02a
help text updated
vincent1173 9e87356
added o/p var. option
vincent1173 943e6a8
web.config override undefined with default value
vincent1173 a4479fa
IIS web app deploy task updated
vincent1173 9f35e22
virtual application fix
vincent1173 6415853
modified web.config
vincent1173 1340920
update result variable
vincent1173 1f1e813
help string updated
vincent1173 0bbfb17
Merge branch 'master' of https://github.com/Microsoft/vsts-tasks into…
vincent1173 73df314
patch version updated
vincent1173 86c9bf5
Addressed Review comments
vincent1173 3500570
IIS App Deploy help string updated
vincent1173 4f16b46
bugbash fix
vincent1173 9ab7ef1
Bug Bash Fix 2
vincent1173 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ export async function getInstalledExtensions(publishingProfile) { | |
var extensionsList = JSON.parse(body); | ||
for(var extension of extensionsList) { | ||
tl.debug('* ' + extension['id']); | ||
installedExtensionsList[extension['id']] = extension['title']; | ||
installedExtensionsList[extension['id']] = extension; | ||
} | ||
defer.resolve(installedExtensionsList); | ||
} | ||
|
@@ -52,8 +52,9 @@ export async function installExtension(publishingProfile, extension: string) { | |
} | ||
else if(response.statusCode === 200) { | ||
tl.debug(body); | ||
console.log(tl.loc('ExtensionInstallSuccess', extension)); | ||
defer.resolve(JSON.parse(body)); | ||
var responseBody = JSON.parse(body); | ||
console.log(tl.loc('ExtensionInstallSuccess', responseBody['title'])); | ||
defer.resolve(responseBody); | ||
} | ||
else { | ||
console.log(body); | ||
|
@@ -64,19 +65,48 @@ export async function installExtension(publishingProfile, extension: string) { | |
return defer.promise; | ||
} | ||
|
||
export async function installExtensions(publishingProfile, extensions: Array<string>) { | ||
export async function installExtensions(publishingProfile, extensions: Array<string>, extensionOutputVariables: Array<string>) { | ||
|
||
var outputVariableCount = 0; | ||
var outputVariableSize = extensionOutputVariables.length; | ||
var InstalledExtensions = await getInstalledExtensions(publishingProfile); | ||
var extensionInfo = null; | ||
var anyExtensionInstalled = false; | ||
for(var extension of extensions) { | ||
extension = extension.trim(); | ||
if(InstalledExtensions[extension]) { | ||
console.log(tl.loc('ExtensionAlreadyAvaiable', InstalledExtensions[extension])); | ||
extensionInfo = InstalledExtensions[extension]; | ||
console.log(tl.loc('ExtensionAlreadyAvaiable', extensionInfo['title'])); | ||
} | ||
else { | ||
tl.debug("Extension '" + extension + "' not installed. Installing..."); | ||
await installExtension(publishingProfile, extension); | ||
extensionInfo = await installExtension(publishingProfile, extension); | ||
anyExtensionInstalled = true; | ||
} | ||
if(outputVariableCount < outputVariableSize) { | ||
var extensionLocalPath: string = getExtensionLocalPath(extensionInfo); | ||
tl.debug('Set Variable ' + extensionOutputVariables[outputVariableCount] + ' to value: ' + extensionLocalPath); | ||
tl.setVariable(extensionOutputVariables[outputVariableCount], extensionLocalPath); | ||
outputVariableCount += 1; | ||
} | ||
} | ||
return anyExtensionInstalled; | ||
} | ||
|
||
function getExtensionLocalPath(extensionInfo: JSON): string { | ||
var extensionId: string = extensionInfo['id']; | ||
var homeDir = "D:\\home\\"; | ||
|
||
if(extensionId.startsWith('python2')) { | ||
return homeDir + "Python27"; | ||
} | ||
else if(extensionId.startsWith('python351') || extensionId.startsWith('python352')) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this may not be required as we are not showing option to install 3.5 < python version < 3.5.3 ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Additional check, if we add them. |
||
return homeDir + "Python35"; | ||
} | ||
else if(extensionId.startsWith('python3')) { | ||
return homeDir + extensionId; | ||
} | ||
else { | ||
return extensionInfo['local_path']; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we wait for Stop as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stop actually stops the App Service to accept any request. We should be good here.