Skip to content

Commit 8d3cf6a

Browse files
author
Rajat Agrawal
authored
Merge pull request #9145 from Microsoft/users/raagra/azure-powershell-logout-m143
Logging out from Azure in powershell based tasks
2 parents ad2e62b + 2d3a30c commit 8d3cf6a

30 files changed

+68
-11
lines changed

Tasks/AzureCloudPowerShellDeploymentV1/Publish-AzureCloudDeployment.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ try{
176176
Validate-AzureCloudServiceStatus -CloudServiceName $ServiceName -Slot $Slot
177177
}
178178
} finally {
179+
Disconnect-AzureAndClearContext
179180
Trace-VstsLeavingInvocation $MyInvocation
180181
}
181182

Tasks/AzureCloudPowerShellDeploymentV1/task.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"version": {
1717
"Major": 1,
1818
"Minor": 3,
19-
"Patch": 11
19+
"Patch": 12
2020
},
2121
"demands": [
2222
"azureps"

Tasks/AzureCloudPowerShellDeploymentV1/task.loc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"version": {
1717
"Major": 1,
1818
"Minor": 3,
19-
"Patch": 10
19+
"Patch": 12
2020
},
2121
"demands": [
2222
"azureps"

Tasks/AzureFileCopyV1/AzureFileCopy.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ finally
197197
{
198198
Remove-AzureContainer -containerName $containerName -storageContext $storageContext
199199
Remove-EndpointSecrets
200+
Disconnect-AzureAndClearContext
200201
Write-Verbose "Completed Azure File Copy Task for Azure VMs Destination" -Verbose
201202
Trace-VstsLeavingInvocation $MyInvocation
202203
}

Tasks/AzureFileCopyV1/task.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"version": {
1414
"Major": 1,
1515
"Minor": 0,
16-
"Patch": 144
16+
"Patch": 145
1717
},
1818
"demands": [
1919
"azureps"

Tasks/AzureFileCopyV1/task.loc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"version": {
1414
"Major": 1,
1515
"Minor": 0,
16-
"Patch": 143
16+
"Patch": 145
1717
},
1818
"demands": [
1919
"azureps"

Tasks/AzureFileCopyV2/AzureFileCopy.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ finally
249249
{
250250
Remove-AzureContainer -containerName $containerName -storageContext $storageContext
251251
Remove-EndpointSecrets
252+
Disconnect-AzureAndClearContext
252253
Write-Verbose "Completed Azure File Copy Task for Azure VMs Destination" -Verbose
253254
Trace-VstsLeavingInvocation $MyInvocation
254255
}

Tasks/AzureFileCopyV2/task.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"version": {
1414
"Major": 2,
1515
"Minor": 0,
16-
"Patch": 15
16+
"Patch": 16
1717
},
1818
"preview": true,
1919
"demands": [

Tasks/AzureFileCopyV2/task.loc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"version": {
1414
"Major": 2,
1515
"Minor": 0,
16-
"Patch": 14
16+
"Patch": 16
1717
},
1818
"preview": true,
1919
"demands": [

Tasks/AzurePowerShellV2/AzurePowerShell.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,6 @@ finally {
139139
if ($__vstsAzPSInlineScriptPath -and (Test-Path -LiteralPath $__vstsAzPSInlineScriptPath) ) {
140140
Remove-Item -LiteralPath $__vstsAzPSInlineScriptPath -ErrorAction 'SilentlyContinue'
141141
}
142+
143+
Disconnect-AzureAndClearContext
142144
}

0 commit comments

Comments
 (0)