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

Revert "Removing Azure and AzureRM 2.1.0 from hosted agent" #11079

Merged
merged 1 commit into from
Aug 6, 2019
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
1 change: 0 additions & 1 deletion Tasks/AzurePowerShellV4/AzurePowerShell.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ if ($targetAzurePs -eq $latestVersion) {

$serviceName = Get-VstsInput -Name ConnectedServiceNameARM -Require
$endpoint = Get-VstsEndpoint -Name $serviceName -Require
$env:PSModulePath = Get-VstsTaskVariable -Name "AZ_PS_MODULE_PATH"

Update-PSModulePathForHostedAgent -targetAzurePs $targetAzurePs

Expand Down
21 changes: 0 additions & 21 deletions Tasks/AzurePowerShellV4/PreJobExecutionAzurePowerShell.ps1

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ Register-Mock Initialize-AzModule
Register-Mock Remove-EndpointSecrets
Register-Mock Disconnect-AzureAndClearContext
Register-Mock Get-VstsEndpoint
Register-Mock Get-VstsTaskVariable
Register-Mock Set-VstsTaskVariable

# Act.
$actual = @( & $PSScriptRoot\..\AzurePowerShell.ps1 )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ Register-Mock Initialize-AzModule
Register-Mock Remove-EndpointSecrets
Register-Mock Disconnect-AzureAndClearContext
Register-Mock Get-VstsEndpoint
Register-Mock Get-VstsTaskVariable
Register-Mock Set-VstsTaskVariable

# Act.
$actual = @( & $PSScriptRoot\..\AzurePowerShell.ps1 )
Expand Down
2 changes: 0 additions & 2 deletions Tasks/AzurePowerShellV4/Tests/DoesNotUnravelOutput.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ Register-Mock Initialize-AzModule
Register-Mock Remove-EndpointSecrets
Register-Mock Disconnect-AzureAndClearContext
Register-Mock Get-VstsEndpoint
Register-Mock Get-VstsTaskVariable
Register-Mock Set-VstsTaskVariable

# Act.
$actual = @( & $PSScriptRoot\..\AzurePowerShell.ps1 )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ Register-Mock Initialize-AzModule
Register-Mock Remove-EndpointSecrets
Register-Mock Disconnect-AzureAndClearContext
Register-Mock Get-VstsEndpoint
Register-Mock Get-VstsTaskVariable
Register-Mock Set-VstsTaskVariable

# Act.
$actual = @( & $PSScriptRoot\..\AzurePowerShell.ps1 )
Expand Down
2 changes: 0 additions & 2 deletions Tasks/AzurePowerShellV4/Tests/PerformsBasicFlow.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ Register-Mock Initialize-AzModule
Register-Mock Get-VstsEndpoint { @{auth = @{ scheme = "ServicePrincipal" }} }
Register-Mock Remove-EndpointSecrets
Register-Mock Disconnect-AzureAndClearContext
Register-Mock Get-VstsTaskVariable
Register-Mock Set-VstsTaskVariable

# Act.
$actual = & $PSScriptRoot\..\AzurePowerShell.ps1
Expand Down
2 changes: 0 additions & 2 deletions Tasks/AzurePowerShellV4/Tests/RedirectsErrors.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ Register-Mock Initialize-AzModule
Register-Mock Remove-EndpointSecrets
Register-Mock Disconnect-AzureAndClearContext
Register-Mock Get-VstsEndpoint
Register-Mock Get-VstsTaskVariable
Register-Mock Set-VstsTaskVariable

# Act.
$actual = @( & $PSScriptRoot\..\AzurePowerShell.ps1 )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ Register-Mock Update-PSModulePathForHostedAgent
Register-Mock Remove-EndpointSecrets
Register-Mock Disconnect-AzureAndClearContext
Register-Mock Get-VstsEndpoint
Register-Mock Get-VstsTaskVariable
Register-Mock Set-VstsTaskVariable

# Arrange the mock task SDK module.
New-Module -Name VstsTaskSdk -ScriptBlock {
Expand Down
3 changes: 0 additions & 3 deletions Tasks/AzurePowerShellV4/Tests/ThrowsForInvalidVersion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ Register-Mock Get-VstsInput { "FilePath" } -- -Name ScriptType -Require
Register-Mock Get-VstsInput { "foobar.ps1" } -- -Name ScriptPath
Register-Mock Get-VstsInput { "OtherVersion" } -- -Name TargetAzurePs
Register-Mock Get-VstsInput { "x.y.z" } -- -Name CustomTargetAzurePs
Register-Mock Get-VstsTaskVariable
Register-Mock Set-VstsTaskVariable
Register-Mock Get-VstsEndpoint

# Act/Assert.
Assert-Throws {
Expand Down
2 changes: 0 additions & 2 deletions Tasks/AzurePowerShellV4/Tests/ValidateInlineScriptFlow.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ Register-Mock Initialize-AzModule
Register-Mock Remove-EndpointSecrets
Register-Mock Disconnect-AzureAndClearContext
Register-Mock Get-VstsEndpoint
Register-Mock Get-VstsTaskVariable
Register-Mock Set-VstsTaskVariable

# Act.
$actual = @( & $PSScriptRoot\..\AzurePowerShell.ps1 )
Expand Down
12 changes: 2 additions & 10 deletions Tasks/AzurePowerShellV4/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"author": "Microsoft Corporation",
"version": {
"Major": 4,
"Minor": 156,
"Patch": 0
"Minor": 154,
"Patch": 5
},
"preview": true,
"releaseNotes": "Added support for Az Module and cross platform agents.",
Expand Down Expand Up @@ -143,14 +143,6 @@
}
],
"instanceNameFormat": "Azure PowerShell script: $(ScriptType)",
"prejobexecution": {
"PowerShell3": {
"target": "PreJobExecutionAzurePowerShell.ps1",
"platforms": [
"windows"
]
}
},
"execution": {
"PowerShell3": {
"target": "azurepowershell.ps1",
Expand Down
12 changes: 2 additions & 10 deletions Tasks/AzurePowerShellV4/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"author": "Microsoft Corporation",
"version": {
"Major": 4,
"Minor": 156,
"Patch": 0
"Minor": 154,
"Patch": 5
},
"preview": true,
"releaseNotes": "ms-resource:loc.releaseNotes",
Expand Down Expand Up @@ -143,14 +143,6 @@
}
],
"instanceNameFormat": "ms-resource:loc.instanceNameFormat",
"prejobexecution": {
"PowerShell3": {
"target": "PreJobExecutionAzurePowerShell.ps1",
"platforms": [
"windows"
]
}
},
"execution": {
"PowerShell3": {
"target": "azurepowershell.ps1",
Expand Down