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

Allow debug output for AzurePowerShellV5 task #20569

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
3 changes: 3 additions & 0 deletions Tasks/AzurePowerShellV5/AzurePowerShell.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ try
$contents += "`$ErrorActionPreference = '$__vsts_input_errorActionPreference'"
if ($env:system_debug -eq "true") {
$contents += "`$VerbosePreference = 'continue'"
$contents += "`$DebugPreference = 'continue'"
# pass env var to dismiss override
$env:ENABLE_DEBUG_PREFERENCE = $true
}

$CoreAzArgument = "-endpoint '$endpoint' -connectedServiceNameARM $serviceName -vstsAccessToken $vstsAccessToken -isPSCore $" + "$input_pwsh"
Expand Down
194 changes: 97 additions & 97 deletions Tasks/AzurePowerShellV5/package-lock.json

Large diffs are not rendered by default.

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": 247,
"Patch": 4
"Patch": 6
},
"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": 247,
"Patch": 4
"Patch": 6
},
"releaseNotes": "ms-resource:loc.releaseNotes",
"groups": [
Expand Down
3 changes: 2 additions & 1 deletion Tasks/Common/VstsAzureHelpers_/VstsAzureHelpers_.psm1
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
$featureFlags = @{
retireAzureRM = [System.Convert]::ToBoolean($env:RETIRE_AZURERM_POWERSHELL_MODULE)
enableDebugPref = [System.Convert]::ToBoolean($env:ENABLE_DEBUG_PREFERENCE)
}

# Private module-scope variables.
$script:azureModule = $null
$script:azureRMProfileModule = $null

# Override the DebugPreference.
if ($global:DebugPreference -eq 'Continue') {
if ($global:DebugPreference -eq 'Continue' -and $featureFlags.enableDebugPref -ne $true) {
Write-Verbose '$OVERRIDING $global:DebugPreference from ''Continue'' to ''SilentlyContinue''.'
$global:DebugPreference = 'SilentlyContinue'
}
Expand Down
4 changes: 2 additions & 2 deletions _generated/AzurePowerShellV5.versionmap.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Default|5.247.4
Node20_229_2|5.247.5
Default|5.247.6
Node20_229_2|5.247.7
3 changes: 3 additions & 0 deletions _generated/AzurePowerShellV5/AzurePowerShell.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ try
$contents += "`$ErrorActionPreference = '$__vsts_input_errorActionPreference'"
if ($env:system_debug -eq "true") {
$contents += "`$VerbosePreference = 'continue'"
$contents += "`$DebugPreference = 'continue'"
# pass env var to dismiss override
$env:ENABLE_DEBUG_PREFERENCE = $true
}

$CoreAzArgument = "-endpoint '$endpoint' -connectedServiceNameARM $serviceName -vstsAccessToken $vstsAccessToken -isPSCore $" + "$input_pwsh"
Expand Down
194 changes: 97 additions & 97 deletions _generated/AzurePowerShellV5/package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions _generated/AzurePowerShellV5/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"version": {
"Major": 5,
"Minor": 247,
"Patch": 4
"Patch": 6
},
"releaseNotes": "Added support for Az Module and cross platform agents.",
"groups": [
Expand Down Expand Up @@ -204,7 +204,7 @@
"PS_ExitCode": "PowerShell exited with code '{0}'."
},
"_buildConfigMapping": {
"Default": "5.247.4",
"Node20_229_2": "5.247.5"
"Default": "5.247.6",
"Node20_229_2": "5.247.7"
}
}
6 changes: 3 additions & 3 deletions _generated/AzurePowerShellV5/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"version": {
"Major": 5,
"Minor": 247,
"Patch": 4
"Patch": 6
},
"releaseNotes": "ms-resource:loc.releaseNotes",
"groups": [
Expand Down Expand Up @@ -204,7 +204,7 @@
"PS_ExitCode": "ms-resource:loc.messages.PS_ExitCode"
},
"_buildConfigMapping": {
"Default": "5.247.4",
"Node20_229_2": "5.247.5"
"Default": "5.247.6",
"Node20_229_2": "5.247.7"
}
}
3 changes: 3 additions & 0 deletions _generated/AzurePowerShellV5_Node20/AzurePowerShell.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ try
$contents += "`$ErrorActionPreference = '$__vsts_input_errorActionPreference'"
if ($env:system_debug -eq "true") {
$contents += "`$VerbosePreference = 'continue'"
$contents += "`$DebugPreference = 'continue'"
# pass env var to dismiss override
$env:ENABLE_DEBUG_PREFERENCE = $true
}

$CoreAzArgument = "-endpoint '$endpoint' -connectedServiceNameARM $serviceName -vstsAccessToken $vstsAccessToken -isPSCore $" + "$input_pwsh"
Expand Down
6 changes: 3 additions & 3 deletions _generated/AzurePowerShellV5_Node20/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"version": {
"Major": 5,
"Minor": 247,
"Patch": 5
"Patch": 7
},
"releaseNotes": "Added support for Az Module and cross platform agents.",
"groups": [
Expand Down Expand Up @@ -208,7 +208,7 @@
"PS_ExitCode": "PowerShell exited with code '{0}'."
},
"_buildConfigMapping": {
"Default": "5.247.4",
"Node20_229_2": "5.247.5"
"Default": "5.247.6",
"Node20_229_2": "5.247.7"
}
}
6 changes: 3 additions & 3 deletions _generated/AzurePowerShellV5_Node20/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"version": {
"Major": 5,
"Minor": 247,
"Patch": 5
"Patch": 7
},
"releaseNotes": "ms-resource:loc.releaseNotes",
"groups": [
Expand Down Expand Up @@ -208,7 +208,7 @@
"PS_ExitCode": "ms-resource:loc.messages.PS_ExitCode"
},
"_buildConfigMapping": {
"Default": "5.247.4",
"Node20_229_2": "5.247.5"
"Default": "5.247.6",
"Node20_229_2": "5.247.7"
}
}
Loading