From a0bcca3723beadd24666c8dbf1f533ed8c60261a Mon Sep 17 00:00:00 2001 From: Ajay Kumar Yadav Date: Tue, 3 Apr 2018 14:40:41 +0530 Subject: [PATCH] cloud service fix (#6862) * cloud service fix * updated patch version --- .../Publish-AzureCloudDeployment.ps1 | 58 +++++++++---------- .../resources.resjson/en-US/resources.resjson | 2 +- .../task.loc.json | 14 ++--- 3 files changed, 37 insertions(+), 37 deletions(-) diff --git a/Tasks/AzureCloudPowerShellDeployment/Publish-AzureCloudDeployment.ps1 b/Tasks/AzureCloudPowerShellDeployment/Publish-AzureCloudDeployment.ps1 index 371116096857..805bb6f1615f 100644 --- a/Tasks/AzureCloudPowerShellDeployment/Publish-AzureCloudDeployment.ps1 +++ b/Tasks/AzureCloudPowerShellDeployment/Publish-AzureCloudDeployment.ps1 @@ -45,7 +45,7 @@ try{ $azureServiceError | ForEach-Object { Write-Verbose $_.Exception.ToString() } } - + if (!$azureService) { $azureService = "New-AzureService -ServiceName `"$ServiceName`"" @@ -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 -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 -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 " -            $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 " -            $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 -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 -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 " +  $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 " + $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 diff --git a/Tasks/AzureCloudPowerShellDeployment/Strings/resources.resjson/en-US/resources.resjson b/Tasks/AzureCloudPowerShellDeployment/Strings/resources.resjson/en-US/resources.resjson index 38342629365d..709c14975103 100644 --- a/Tasks/AzureCloudPowerShellDeployment/Strings/resources.resjson/en-US/resources.resjson +++ b/Tasks/AzureCloudPowerShellDeployment/Strings/resources.resjson/en-US/resources.resjson @@ -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." -} +} \ No newline at end of file diff --git a/Tasks/AzureCloudPowerShellDeployment/task.loc.json b/Tasks/AzureCloudPowerShellDeployment/task.loc.json index 44c15efa3ddd..93d4ebef2744 100644 --- a/Tasks/AzureCloudPowerShellDeployment/task.loc.json +++ b/Tasks/AzureCloudPowerShellDeployment/task.loc.json @@ -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 }, { @@ -234,4 +234,4 @@ "Customcertificatesaredefinedininvalidformat": "ms-resource:loc.messages.Customcertificatesaredefinedininvalidformat", "Addinganyconfiguredcustomcertificates": "ms-resource:loc.messages.Addinganyconfiguredcustomcertificates" } -} +} \ No newline at end of file