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
AzureRMWebAppTask migrated to nodejs #2506
Conversation
… users/vinca/MigrateToNode
* Removing PS Fies * Added support for folder and optinal parameters.xml in package * Changes after conflicts * Indentation changes * correction * Indentation correction * Corrected review comments
Changed Request to HttpClient
Azure RM Upgrade scenario handling in task
SetParamFile issue fix
#2451) * Conditional selection of deployment tool and check for param file on linux plat * PR review correction and few fixes for linux agent. * check of Parameter.xml
Task upgrade fix for not reading right inputs
* Path with '&' issue Fix * Using Local MSDeploy Fix * Resource File Updated * L0 Tests Updated (Ashish) * Gulp Test Fix * TypoError Fix
…ixes Reverting compact changes handling in UI
@@ -1,8 +1,8 @@ | |||
{ | |||
"id": "497D490F-EEA7-4F2B-AB94-48D9C1ACDCB1", | |||
"name": "AzureRMWebAppDeployment", |
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.
Do sit with PM once and get final help markdowns scrubbed
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.
Done
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.
Looks fine
} | ||
|
||
if(canUseWebDeploy(useWebDeploy)) { | ||
tl._writeLine("##vso[task.setvariable variable=websitePassword;issecret=true;]" + publishingProfile.userPWD); |
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.
Mask user id 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.
Done
} | ||
finally { | ||
if(!isDeploymentSuccess) { | ||
throw Error(deploymentError); |
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.
Move this code out of finally block as this not at all related to previous try/catch
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.
Done
} | ||
finally { | ||
if(!isDeploymentSuccess) { | ||
throw Error(deploymentError); |
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.
Move this code out of finally block as this not at all related to previous try/catch
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.
Done
function fileExists(path): boolean { | ||
try { | ||
return tl.stats(path).isFile(); | ||
} |
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.
Post this review can you add this function in vsts-task-lib 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.
Will do it.
return requestDetails; | ||
} | ||
|
||
async function getWebAppPublishProfile(SPN, webAppName: string, resourceGroupName: string, deployToSlotFlag: boolean, slotName: string ) { |
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.
This is not required to be separate function merge both functions
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.
Done
"name": "Package", | ||
"type": "filePath", | ||
"label": "Package", | ||
"label": "Package or Folder", | ||
"defaultValue": "", | ||
"required": true, | ||
"helpMarkDown": "Location of the Web App zip package on the automation agent or on a UNC path accessible to the automation agent like, \\\\\\\\BudgetIT\\Web\\Deploy\\Fabrikam.zip. Predefined system variables and wild cards like, $(System.DefaultWorkingDirectory)\\\\***.zip` can be also used here." |
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.
Folder or file path to the Web App package. Variables (Build | Release), wild cards are supported.
For example, $(System.DefaultWorkingDirectory)\***.zip
"defaultValue": "", | ||
"required": true, | ||
"helpMarkDown": "Location of the Web App zip package on the automation agent or on a UNC path accessible to the automation agent like, \\\\\\\\BudgetIT\\Web\\Deploy\\Fabrikam.zip. Predefined system variables and wild cards like, $(System.DefaultWorkingDirectory)\\\\***.zip` can be also used here." | ||
}, | ||
{ | ||
"name": "WebAppUri", | ||
"type": "string", | ||
"label": "Web App Hosted Url", |
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.
Remove Hosted, the text would just be "Web App URL"
"required": false, | ||
"defaultValue": "", | ||
"groupName": "output", | ||
"helpMarkDown": "Provide a name for the variable for the webapp hosted url. The variable can be used as $(variableName) to refer to the hosted url of webapp in subsequent tasks like in the PowerShell on Target Machines task." |
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.
Specify a name for the output variable that is generated for the URL of the Web App. The variable can be consumed in subsequent tasks.
"required": false, | ||
"defaultValue": "true", | ||
"groupName": "AdditionalDeploymentOptions", | ||
"helpMarkDown": "The Web Deploy options will only work when the automation agent is on Windows and will be ignored on Linux. The options are also ignored for file formats that are not zipped or in a folders, like Java WAR files. FTP works with automation agent on both Windows and Linux and for zip files, folders, and Java WAR files." |
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.
"Publish using web deploy options are supported only when using Windows agent. On other platforms, the task relies on Kudu REST APIs (https://github.com/projectkudu/kudu/wiki/REST-API) to deploy the Web App, and following options are not supported"
* Migrating from Powershell to Node.js * Made Change to Friendly Name * Additional Changes * Additional Changes * Made changes to RMUtil * Made change to Rest Call * Added Q * Added Q Library * Rearranged module headers * Made changes to task.json * Redefining error message * Removing PS Files * MSDEPloyexePath Function added * MSDEPloyexePath Function added * Changed then with await, package.json updated * Removing .taskkey * Run MSDeploycommand function updated * Async await changes * Handling files with spaces * CheckFile Function added * Fix for task not failing in case of error * Fixed review comments * Destination output url Fix * Publishing profile Fix * SetParamFile find Fix * SetParam File Fix * File supplied Fix * Fixing few formatting issues * Users/ajya/node js folder support to task (#2328) * Removing PS Fies * Added support for folder and optinal parameters.xml in package * Changes after conflicts * Indentation changes * correction * Indentation correction * Corrected review comments * PR Review Fix (MSDeploy return code Fix) * Added WebDeploy Function * Added Comments at Method Level * AzureRMUtil Update Deployment History Fix * Fixing Formatting issues * Destination URL Fix * common part moved to main * Deployment of webapplication using KUDU service * Indentation correction of deferred statement * added messages that will be help for debugging. * Adding unit test for AzureRMWebAppDeployment Task (#2386) * Adding unit test for AzureRMWebAppDeployment Task * Made changes according to PR comments * Made changes according to PR comments * Azure RM Upgrade scenario handling in task * Review comment fixes * Changed Request to HttpClient * Changes Reqyest to HttpClient * Changed Error to defer(reject) * Changed tl to defer(resolve) * SetParamFile issue fix * msDepoyBatchFIle Path FIx * Conditional selection of deployment tool and check for param file on … (#2451) * Conditional selection of deployment tool and check for param file on linux plat * PR review correction and few fixes for linux agent. * check of Parameter.xml * Added unit test (#2444) * Task upgrade fix for not reading right inputs * Reverting compact changes handling in UI * Path Issue & Bug Bash Fix (#2512) * Path with '&' issue Fix * Using Local MSDeploy Fix * Resource File Updated * L0 Tests Updated (Ashish) * Gulp Test Fix * TypoError Fix * enabling appoffline feature by default (#2555) * Parameter Content Fix (#2557) * Help mark down corrected
* AzureRMWebAppTask migrated to nodejs (#2506) * Migrating from Powershell to Node.js * Made Change to Friendly Name * Additional Changes * Additional Changes * Made changes to RMUtil * Made change to Rest Call * Added Q * Added Q Library * Rearranged module headers * Made changes to task.json * Redefining error message * Removing PS Files * MSDEPloyexePath Function added * MSDEPloyexePath Function added * Changed then with await, package.json updated * Removing .taskkey * Run MSDeploycommand function updated * Async await changes * Handling files with spaces * CheckFile Function added * Fix for task not failing in case of error * Fixed review comments * Destination output url Fix * Publishing profile Fix * SetParamFile find Fix * SetParam File Fix * File supplied Fix * Fixing few formatting issues * Users/ajya/node js folder support to task (#2328) * Removing PS Fies * Added support for folder and optinal parameters.xml in package * Changes after conflicts * Indentation changes * correction * Indentation correction * Corrected review comments * PR Review Fix (MSDeploy return code Fix) * Added WebDeploy Function * Added Comments at Method Level * AzureRMUtil Update Deployment History Fix * Fixing Formatting issues * Destination URL Fix * common part moved to main * Deployment of webapplication using KUDU service * Indentation correction of deferred statement * added messages that will be help for debugging. * Adding unit test for AzureRMWebAppDeployment Task (#2386) * Adding unit test for AzureRMWebAppDeployment Task * Made changes according to PR comments * Made changes according to PR comments * Azure RM Upgrade scenario handling in task * Review comment fixes * Changed Request to HttpClient * Changes Reqyest to HttpClient * Changed Error to defer(reject) * Changed tl to defer(resolve) * SetParamFile issue fix * msDepoyBatchFIle Path FIx * Conditional selection of deployment tool and check for param file on … (#2451) * Conditional selection of deployment tool and check for param file on linux plat * PR review correction and few fixes for linux agent. * check of Parameter.xml * Added unit test (#2444) * Task upgrade fix for not reading right inputs * Reverting compact changes handling in UI * Path Issue & Bug Bash Fix (#2512) * Path with '&' issue Fix * Using Local MSDeploy Fix * Resource File Updated * L0 Tests Updated (Ashish) * Gulp Test Fix * TypoError Fix * enabling appoffline feature by default (#2555) * Parameter Content Fix (#2557) * Help mark down corrected * renamed files to lowercase case (#2560) * renamed files to lowercase case * PR comment pending changes * Path Regex Fix (#2571) * Users/ajya/option depn fix reg edit (#2586) * replaced regedit with winreg * converted case to small case * reverting app offline flag value * renamed method * changed logic for gettting latest version * Revert changes for regedit * optional dependency
Merging rmmaster2 to master