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

Migrate tasks from deprecated AzureRM powershell functions to AZ powershell functions #19801

Merged
Merged
2 changes: 1 addition & 1 deletion Tasks/AzureCloudPowerShellDeploymentV1/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"version": {
"Major": 1,
"Minor": 239,
"Patch": 0
"Patch": 1
},
"demands": [
"azureps"
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureCloudPowerShellDeploymentV1/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"version": {
"Major": 1,
"Minor": 239,
"Patch": 0
"Patch": 1
},
"demands": [
"azureps"
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureCloudPowerShellDeploymentV2/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"version": {
"Major": 2,
"Minor": 239,
"Patch": 0
"Patch": 1
},
"demands": [
"azureps"
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureCloudPowerShellDeploymentV2/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"version": {
"Major": 2,
"Minor": 239,
"Patch": 0
"Patch": 1
},
"demands": [
"azureps"
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureFileCopyV1/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 1,
"Minor": 239,
"Patch": 0
"Patch": 1
},
"demands": [
"azureps"
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureFileCopyV1/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 1,
"Minor": 239,
"Patch": 0
"Patch": 1
},
"demands": [
"azureps"
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureFileCopyV2/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 2,
"Minor": 239,
"Patch": 0
"Patch": 2
},
"demands": [
"azureps"
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureFileCopyV2/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 2,
"Minor": 239,
"Patch": 0
"Patch": 2
},
"demands": [
"azureps"
Expand Down
11 changes: 10 additions & 1 deletion Tasks/AzureFileCopyV3/Tests/L0GetAzureUtility.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
[CmdletBinding()]
param()

$featureFlags = @{
retireAzureRM = [System.Convert]::ToBoolean($env:RETIRE_AZURERM_POWERSHELL_MODULE)
}


. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1

$azModule100 = New-Object -TypeName System.Version -ArgumentList "1.0.0"
Expand All @@ -19,4 +24,8 @@ Assert-AreEqual $azureUtilityFile "AzureUtilityAz1.0.ps1"
Unregister-Mock Get-Module
Register-Mock Get-Module { return }
$azureUtilityFile = Get-AzureUtility -connectedServiceName $connectedServiceName
Assert-AreEqual $azureUtilityFile "AzureUtilityARM.ps1"
if ($featureFlags.retireAzureRM) {
Assert-AreEqual $azureUtilityFile "AzureUtilityAz1.0.ps1"
} else {
Assert-AreEqual $azureUtilityFile "AzureUtilityARM.ps1"
}
2 changes: 1 addition & 1 deletion Tasks/AzureFileCopyV3/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 3,
"Minor": 239,
"Patch": 0
"Patch": 2
},
"demands": [
"azureps"
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureFileCopyV3/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 3,
"Minor": 239,
"Patch": 0
"Patch": 2
},
"demands": [
"azureps"
Expand Down
6 changes: 5 additions & 1 deletion Tasks/AzureFileCopyV4/Tests/L0GetAzureUtility.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,8 @@ Assert-AreEqual $azureUtilityFile "AzureUtilityAz1.0.ps1"
Unregister-Mock Get-Module
Register-Mock Get-Module { return }
$azureUtilityFile = Get-AzureUtility -connectedServiceName $connectedServiceName
Assert-AreEqual $azureUtilityFile "AzureUtilityARM.ps1"
if ($featureFlags.retireAzureRM) {
Assert-AreEqual $azureUtilityFile "AzureUtilityAz1.0.ps1"
} else {
Assert-AreEqual $azureUtilityFile "AzureUtilityARM.ps1"
}
2 changes: 1 addition & 1 deletion Tasks/AzureFileCopyV4/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 4,
"Minor": 239,
"Patch": 0
"Patch": 2
},
"demands": [
"azureps"
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureFileCopyV4/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 4,
"Minor": 239,
"Patch": 0
"Patch": 2
},
"demands": [
"azureps"
Expand Down
6 changes: 5 additions & 1 deletion Tasks/AzureFileCopyV5/Tests/L0GetAzureUtility.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,8 @@ Assert-AreEqual $azureUtilityFile "AzureUtilityAz1.0.ps1"
Unregister-Mock Get-Module
Register-Mock Get-Module { return }
$azureUtilityFile = Get-AzureUtility -connectedServiceName $connectedServiceName
Assert-AreEqual $azureUtilityFile "AzureUtilityARM.ps1"
if ($featureFlags.retireAzureRM) {
Assert-AreEqual $azureUtilityFile "AzureUtilityAz1.0.ps1"
} else {
Assert-AreEqual $azureUtilityFile "AzureUtilityARM.ps1"
}
2 changes: 1 addition & 1 deletion Tasks/AzureFileCopyV5/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 5,
"Minor": 239,
"Patch": 0
"Patch": 2
},
"demands": [
"azureps"
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureFileCopyV5/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 5,
"Minor": 239,
"Patch": 0
"Patch": 2
},
"demands": [
"azureps"
Expand Down
6 changes: 5 additions & 1 deletion Tasks/AzureFileCopyV6/Tests/L0GetAzureUtility.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,8 @@ Assert-AreEqual $azureUtilityFile "AzureUtilityAz1.0.ps1"
Unregister-Mock Get-Module
Register-Mock Get-Module { return }
$azureUtilityFile = Get-AzureUtility -connectedServiceName $connectedServiceName
Assert-AreEqual $azureUtilityFile "AzureUtilityARM.ps1"
if ($featureFlags.retireAzureRM) {
Assert-AreEqual $azureUtilityFile "AzureUtilityAz1.0.ps1"
} else {
Assert-AreEqual $azureUtilityFile "AzureUtilityARM.ps1"
}
2 changes: 1 addition & 1 deletion Tasks/AzureFileCopyV6/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 6,
"Minor": 239,
"Patch": 0
"Patch": 2
},
"demands": [
"azureps"
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureFileCopyV6/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 6,
"Minor": 239,
"Patch": 0
"Patch": 2
},
"demands": [
"azureps"
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzurePowerShellV2/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"version": {
"Major": 2,
"Minor": 239,
"Patch": 0
"Patch": 1
},
"demands": [
"azureps"
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzurePowerShellV2/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"version": {
"Major": 2,
"Minor": 239,
"Patch": 0
"Patch": 1
},
"demands": [
"azureps"
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzurePowerShellV3/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"version": {
"Major": 3,
"Minor": 239,
"Patch": 0
"Patch": 1
},
"releaseNotes": "Added support for Fail on standard error and ErrorActionPreference",
"demands": [
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzurePowerShellV3/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"version": {
"Major": 3,
"Minor": 239,
"Patch": 0
"Patch": 1
},
"releaseNotes": "ms-resource:loc.releaseNotes",
"demands": [
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzurePowerShellV4/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"version": {
"Major": 4,
"Minor": 239,
"Patch": 0
"Patch": 2
},
"releaseNotes": "Added support for Az Module and cross platform agents.",
"groups": [
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzurePowerShellV4/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"version": {
"Major": 4,
"Minor": 239,
"Patch": 0
"Patch": 2
},
"releaseNotes": "ms-resource:loc.releaseNotes",
"groups": [
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzurePowerShellV5/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"version": {
"Major": 5,
"Minor": 239,
"Patch": 0
"Patch": 2
},
"releaseNotes": "Added support for Az Module and cross platform agents.",
"groups": [
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzurePowerShellV5/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"version": {
"Major": 5,
"Minor": 239,
"Patch": 0
"Patch": 2
},
"releaseNotes": "ms-resource:loc.releaseNotes",
"groups": [
Expand Down
Loading