Skip to content

Commit

Permalink
cloud service fix (#6862)
Browse files Browse the repository at this point in the history
* cloud service fix

* updated patch version
  • Loading branch information
Ajay Kumar Yadav authored Apr 3, 2018
1 parent 5e03bdb commit a0bcca3
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ try{
$azureServiceError | ForEach-Object { Write-Verbose $_.Exception.ToString() }
}


if (!$azureService)
{
$azureService = "New-AzureService -ServiceName `"$ServiceName`""
Expand Down Expand Up @@ -97,34 +97,34 @@ try{
$azureDeployment = New-AzureDeployment -ServiceName $ServiceName -Package $servicePackageFile -Configuration $serviceConfigFile -Slot $Slot -ExtensionConfiguration $diagnosticExtensions
}
}
    elseif ($AllowUpgrade -eq $true -and $SimultaneousUpgrade -eq $true -and $ForceUpgrade -eq $true)
    {
        #Use -Upgrade -Mode Simultaneous -Force
        if ($label)
        {
            Write-Host "##[command]Set-AzureDeployment -Upgrade -ServiceName $ServiceName -Package $servicePackageFile -Configuration $serviceConfigFile -Slot $Slot -Mode Simultaneous -Label $label -ExtensionConfiguration <extensions> -Force"
            $azureDeployment = Set-AzureDeployment -Upgrade -ServiceName $ServiceName -Package $servicePackageFile -Configuration $serviceConfigFile -Slot $Slot -Mode Simultaneous -Label $label -ExtensionConfiguration $diagnosticExtensions -Force
        }
        else
        {
            Write-Host "##[command]Set-AzureDeployment -Upgrade -ServiceName $ServiceName -Package $servicePackageFile -Configuration $serviceConfigFile -Slot $Slot -Mode Simultaneous -ExtensionConfiguration <extensions> -Force"
            $azureDeployment = Set-AzureDeployment -Upgrade -ServiceName $ServiceName -Package $servicePackageFile -Configuration $serviceConfigFile -Slot $Slot -Mode Simultaneous -ExtensionConfiguration $diagnosticExtensions -Force
        }
    }
    elseif ($AllowUpgrade -eq $true -and $SimultaneousUpgrade -eq $true)
    {
        #Use -Upgrade -Mode Simultaneous
        if ($label)
        {
            Write-Host "##[command]Set-AzureDeployment -Upgrade -ServiceName $ServiceName -Package $servicePackageFile -Configuration $serviceConfigFile -Slot $Slot -Mode Simultaneous -Label $label -ExtensionConfiguration <extensions>"
            $azureDeployment = Set-AzureDeployment -Upgrade -ServiceName $ServiceName -Package $servicePackageFile -Configuration $serviceConfigFile -Slot $Slot -Mode Simultaneous -Label $label -ExtensionConfiguration $diagnosticExtensions
        }
        else
        {
            Write-Host "##[command]Set-AzureDeployment -Upgrade -ServiceName $ServiceName -Package $servicePackageFile -Configuration $serviceConfigFile -Slot $Slot -Mode Simultaneous -ExtensionConfiguration <extensions>"
            $azureDeployment = Set-AzureDeployment -Upgrade -ServiceName $ServiceName -Package $servicePackageFile -Configuration $serviceConfigFile -Slot $Slot -Mode Simultaneous -ExtensionConfiguration $diagnosticExtensions
        }
    }
elseif ($AllowUpgrade -eq $true -and $SimultaneousUpgrade -eq $true -and $ForceUpgrade -eq $true)
{
#Use -Upgrade -Mode Simultaneous -Force
if ($label)
{
  Write-Host "##[command]Set-AzureDeployment -Upgrade -ServiceName $ServiceName -Package $servicePackageFile -Configuration $serviceConfigFile -Slot $Slot -Mode Simultaneous -Label $label -ExtensionConfiguration <extensions> -Force"
  $azureDeployment = Set-AzureDeployment -Upgrade -ServiceName $ServiceName -Package $servicePackageFile -Configuration $serviceConfigFile -Slot $Slot -Mode Simultaneous -Label $label -ExtensionConfiguration $diagnosticExtensions -Force
}
else
{
  Write-Host "##[command]Set-AzureDeployment -Upgrade -ServiceName $ServiceName -Package $servicePackageFile -Configuration $serviceConfigFile -Slot $Slot -Mode Simultaneous -ExtensionConfiguration <extensions> -Force"
  $azureDeployment = Set-AzureDeployment -Upgrade -ServiceName $ServiceName -Package $servicePackageFile -Configuration $serviceConfigFile -Slot $Slot -Mode Simultaneous -ExtensionConfiguration $diagnosticExtensions -Force
}
}
elseif ($AllowUpgrade -eq $true -and $SimultaneousUpgrade -eq $true)
{
#Use -Upgrade -Mode Simultaneous
if ($label)
{
  Write-Host "##[command]Set-AzureDeployment -Upgrade -ServiceName $ServiceName -Package $servicePackageFile -Configuration $serviceConfigFile -Slot $Slot -Mode Simultaneous -Label $label -ExtensionConfiguration <extensions>"
  $azureDeployment = Set-AzureDeployment -Upgrade -ServiceName $ServiceName -Package $servicePackageFile -Configuration $serviceConfigFile -Slot $Slot -Mode Simultaneous -Label $label -ExtensionConfiguration $diagnosticExtensions
}
else
{
  Write-Host "##[command]Set-AzureDeployment -Upgrade -ServiceName $ServiceName -Package $servicePackageFile -Configuration $serviceConfigFile -Slot $Slot -Mode Simultaneous -ExtensionConfiguration <extensions>"
$azureDeployment = Set-AzureDeployment -Upgrade -ServiceName $ServiceName -Package $servicePackageFile -Configuration $serviceConfigFile -Slot $Slot -Mode Simultaneous -ExtensionConfiguration $diagnosticExtensions
}
}
elseif ($AllowUpgrade -eq $true -and $ForceUpgrade -eq $true)
{
#Use -Upgrade
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@
"loc.messages.Currentversionofazurepowershelldontsupportexternalstorageaccountforconfiguringdiagnostics": "Current version of azure powershell does not support external storage account for configuring diagnostics.",
"loc.messages.Customcertificatesaredefinedininvalidformat": "Custom certificates are defined in invalid format.",
"loc.messages.Addinganyconfiguredcustomcertificates": "Adding any configured custom certificates."
}
}
14 changes: 7 additions & 7 deletions Tasks/AzureCloudPowerShellDeployment/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,21 +126,21 @@
"required": true
},
{
"name": "ForceUpgrade",
"name": "SimultaneousUpgrade",
"type": "boolean",
"label": "ms-resource:loc.input.label.ForceUpgrade",
"label": "ms-resource:loc.input.label.SimultaneousUpgrade",
"defaultValue": "false",
"visibleRule": "AllowUpgrade == true",
"helpMarkDown": "ms-resource:loc.input.help.ForceUpgrade",
"helpMarkDown": "ms-resource:loc.input.help.SimultaneousUpgrade",
"required": false
},
{
"name": "SimultaneousUpgrade",
"name": "ForceUpgrade",
"type": "boolean",
"label": "ms-resource:loc.input.label.SimultaneousUpgrade",
"label": "ms-resource:loc.input.label.ForceUpgrade",
"defaultValue": "false",
"visibleRule": "AllowUpgrade == true",
"helpMarkDown": "ms-resource:loc.input.help.SimultaneousUpgrade",
"helpMarkDown": "ms-resource:loc.input.help.ForceUpgrade",
"required": false
},
{
Expand Down Expand Up @@ -234,4 +234,4 @@
"Customcertificatesaredefinedininvalidformat": "ms-resource:loc.messages.Customcertificatesaredefinedininvalidformat",
"Addinganyconfiguredcustomcertificates": "ms-resource:loc.messages.Addinganyconfiguredcustomcertificates"
}
}
}

0 comments on commit a0bcca3

Please sign in to comment.