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

Instead of hard coding kudu url get it from publish profile #1861

Merged
merged 2 commits into from
Jun 10, 2016
Merged
Show file tree
Hide file tree
Changes from all 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
12 changes: 3 additions & 9 deletions Tasks/AzureRmWebAppDeployment/AzureUtility.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function Get-AzureUtility
$azureUtilityNewVersion = "AzureUtilityGTE1.0.ps1"


if( !$currentVersion -and $currentVersion -gt $minimumAzureVersion )
if( $currentVersion -and $currentVersion -gt $minimumAzureVersion )
Copy link
Member

Choose a reason for hiding this comment

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

Check if any tests needs to be updated

{
$azureUtilityRequiredVersion = $azureUtilityNewVersion
}
Expand Down Expand Up @@ -60,14 +60,11 @@ function Get-AzureRMWebAppConnectionDetailsWithSpecificSlot

Write-Host (Get-VstsLocString -Key "GettingconnectiondetailsforazureRMWebApp0underSlot1" -ArgumentList $webAppName, $slotName)

$kuduHostName = $webAppName + "-" + $slotName + ".scm.azurewebsites.net"
Write-Verbose "`t Using KuduHostName:'$kuduHostName' for azureRM WebApp:'$webAppName' under Slot:'$slotName'."

# Get webApp publish profile Object for MSDeploy
$webAppProfileForMSDeploy = Get-AzureRMWebAppProfileForMSDeployWithSpecificSlot -webAppName $webAppName -resourceGroupName $resourceGroupName -slotName $slotName

# construct object to store webApp connection details
$azureRMWebAppConnectionDetailsWithSpecificSlot = Construct-AzureWebAppConnectionObject -kuduHostName $kuduHostName -webAppProfileForMSDeploy $webAppProfileForMSDeploy
$azureRMWebAppConnectionDetailsWithSpecificSlot = Construct-AzureWebAppConnectionObject -webAppProfileForMSDeploy $webAppProfileForMSDeploy

Write-Host (Get-VstsLocString -Key "GotconnectiondetailsforazureRMWebApp0underSlot1" -ArgumentList $webAppName, $slotName)
return $azureRMWebAppConnectionDetailsWithSpecificSlot
Expand All @@ -79,9 +76,6 @@ function Get-AzureRMWebAppConnectionDetailsWithProductionSlot

Write-Host (Get-VstsLocString -Key "GettingconnectiondetailsforazureRMWebApp0underProductionSlot" -ArgumentList $webAppName)

$kuduHostName = $webAppName + ".scm.azurewebsites.net"
Write-Verbose "`t Using KuduHostName:'$kuduHostName' for azureRM WebApp:'$webAppName' under default Slot."

# Get azurerm webApp details
$azureRMWebAppDetails = Get-AzureRMWebAppDetails -webAppName $webAppName

Expand All @@ -100,7 +94,7 @@ function Get-AzureRMWebAppConnectionDetailsWithProductionSlot
$webAppProfileForMSDeploy = Get-AzureRMWebAppProfileForMSDeployWithProductionSlot -webAppName $webAppName -resourceGroupName $resourceGroupName

# construct object to store webApp connection details
$azureRMWebAppConnectionDetailsWithProductionSlot = Construct-AzureWebAppConnectionObject -kuduHostName $kuduHostName -webAppProfileForMSDeploy $webAppProfileForMSDeploy
$azureRMWebAppConnectionDetailsWithProductionSlot = Construct-AzureWebAppConnectionObject -webAppProfileForMSDeploy $webAppProfileForMSDeploy

Write-Host (Get-VstsLocString -Key "GotconnectiondetailsforazureRMWebApp0underProductionSlot" -ArgumentList $webAppName)
return $azureRMWebAppConnectionDetailsWithProductionSlot
Expand Down
4 changes: 2 additions & 2 deletions Tasks/AzureRmWebAppDeployment/AzureUtilityGTE1.0.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ function Get-AzureRMWebAppSlotPublishingProfileARM

function Construct-AzureWebAppConnectionObject
{
param([String][Parameter(Mandatory=$true)] $kuduHostName,
[Object][Parameter(Mandatory=$true)] $webAppProfileForMSDeploy)
param([Object][Parameter(Mandatory=$true)] $webAppProfileForMSDeploy)

# Get userName and userPassword to access kuduServer
$userName = $webAppProfileForMSDeploy.userName
$userPassword = $webAppProfileForMSDeploy.userPWD
$kuduHostName = $webAppProfileForMSDeploy.PublishUrl
Write-Verbose "`t Username is:'$userName' to access KuduHostName:'$kuduHostName'."

$azureRMWebAppConnectionDetails = @{}
Expand Down
4 changes: 2 additions & 2 deletions Tasks/AzureRmWebAppDeployment/AzureUtilityLTE9.8.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ function Get-WebAppRGName

function Construct-AzureWebAppConnectionObject
{
param([String][Parameter(Mandatory=$true)] $kuduHostName,
[Object][Parameter(Mandatory=$true)] $webAppProfileForMSDeploy)
param([Object][Parameter(Mandatory=$true)] $webAppProfileForMSDeploy)

# Get userName and userPassword to access kuduServer
$userName = $webAppProfileForMSDeploy.userName
$userPassword = $webAppProfileForMSDeploy.UserPassword
$kuduHostName = $webAppProfileForMSDeploy.PublishUrl
Write-Verbose "`t Username is:'$userName' to access KuduHostName:'$kuduHostName'."

$azureRMWebAppConnectionDetails = @{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,11 @@ function Get-AzureRMWebAppConnectionDetailsWithSpecificSlot

Write-Host (Get-LocalizedString -Key "Getting connection details for azureRM WebApp:'{0}' under Slot:'{1}'." -ArgumentList $webAppName, $slotName)

$kuduHostName = $webAppName + "-" + $slotName + ".scm.azurewebsites.net"
Write-Verbose "`t Using KuduHostName:'$kuduHostName' for azureRM WebApp:'$webAppName' under Slot:'$slotName'."

# Get webApp publish profile Object for MSDeploy
$webAppProfileForMSDeploy = Get-AzureRMWebAppProfileForMSDeployWithSpecificSlot -webAppName $webAppName -resourceGroupName $resourceGroupName -slotName $slotName

# construct object to store webApp connection details
$azureRMWebAppConnectionDetailsWithSpecificSlot = Construct-AzureWebAppConnectionObject -kuduHostName $kuduHostName -webAppProfileForMSDeploy $webAppProfileForMSDeploy
$azureRMWebAppConnectionDetailsWithSpecificSlot = Construct-AzureWebAppConnectionObject -webAppProfileForMSDeploy $webAppProfileForMSDeploy

Write-Host (Get-LocalizedString -Key "Got connection details for azureRM WebApp:'{0}' under Slot:'{1}'." -ArgumentList $webAppName, $slotName)
return $azureRMWebAppConnectionDetailsWithSpecificSlot
Expand All @@ -79,9 +76,6 @@ function Get-AzureRMWebAppConnectionDetailsWithProductionSlot

Write-Host (Get-LocalizedString -Key "Getting connection details for azureRM WebApp:'{0}' under Production Slot." -ArgumentList $webAppName)

$kuduHostName = $webAppName + ".scm.azurewebsites.net"
Write-Verbose "`t Using KuduHostName:'$kuduHostName' for azureRM WebApp:'$webAppName' under default Slot."

# Get azurerm webApp details
$azureRMWebAppDetails = Get-AzureRMWebAppDetails -webAppName $webAppName

Expand All @@ -100,7 +94,7 @@ function Get-AzureRMWebAppConnectionDetailsWithProductionSlot
$webAppProfileForMSDeploy = Get-AzureRMWebAppProfileForMSDeployWithProductionSlot -webAppName $webAppName -resourceGroupName $resourceGroupName

# construct object to store webApp connection details
$azureRMWebAppConnectionDetailsWithProductionSlot = Construct-AzureWebAppConnectionObject -kuduHostName $kuduHostName -webAppProfileForMSDeploy $webAppProfileForMSDeploy
$azureRMWebAppConnectionDetailsWithProductionSlot = Construct-AzureWebAppConnectionObject -webAppProfileForMSDeploy $webAppProfileForMSDeploy

Write-Host (Get-LocalizedString -Key "Got connection details for azureRM WebApp:'{0}' under Production Slot." -ArgumentList $webAppName)
return $azureRMWebAppConnectionDetailsWithProductionSlot
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ function Get-AzureRMWebAppSlotPublishingProfileARM

function Construct-AzureWebAppConnectionObject
{
param([String][Parameter(Mandatory=$true)] $kuduHostName,
[Object][Parameter(Mandatory=$true)] $webAppProfileForMSDeploy)
param([Object][Parameter(Mandatory=$true)] $webAppProfileForMSDeploy)

# Get userName and userPassword to access kuduServer
$userName = $webAppProfileForMSDeploy.userName
$userPassword = $webAppProfileForMSDeploy.userPWD
$kuduHostName = $webAppProfileForMSDeploy.PublishUrl
Write-Verbose "`t Username is:'$userName' to access KuduHostName:'$kuduHostName'."

$azureRMWebAppConnectionDetails = @{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ function Get-WebAppRGName

function Construct-AzureWebAppConnectionObject
{
param([String][Parameter(Mandatory=$true)] $kuduHostName,
[Object][Parameter(Mandatory=$true)] $webAppProfileForMSDeploy)
param([Object][Parameter(Mandatory=$true)] $webAppProfileForMSDeploy)

# Get userName and userPassword to access kuduServer
$userName = $webAppProfileForMSDeploy.userName
$userPassword = $webAppProfileForMSDeploy.UserPassword
$kuduHostName = $webAppProfileForMSDeploy.PublishUrl
Write-Verbose "`t Username is:'$userName' to access KuduHostName:'$kuduHostName'."

$azureRMWebAppConnectionDetails = @{}
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureRmWebAppDeployment/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"version": {
"Major": 1,
"Minor": 0,
"Patch": 7
"Patch": 8
},
"minimumAgentVersion": "1.99.0",
"groups": [
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureRmWebAppDeployment/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"version": {
"Major": 1,
"Minor": 0,
"Patch": 7
"Patch": 8
},
"minimumAgentVersion": "1.99.0",
"groups": [
Expand Down