Skip to content

Commit f89fa5d

Browse files
fix(powershell): use azdo provided OIDC url variable (#584)
Allows the task to be used in release pipelines. Without this change, the url only applies to build pipelines. * fix oidc request url for PowerShell Module * use the correct OIDC request url * add changelog --------- Co-authored-by: Marian Epure <marian.epure@888holdings.com>
1 parent 331a8e9 commit f89fa5d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Bug Fix",
3+
"description": "use the correct OIDC request url for the PowerShell task"
4+
}

src/tasks/AWSPowerShellModuleScript/RunAWSPowerShellModuleScript.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ try {
116116
}
117117

118118
# Request an OIDC token for the service connection from the VSTS REST API
119-
$url = "$Env:SYSTEM_TEAMFOUNDATIONCOLLECTIONURI$Env:SYSTEM_TEAMPROJECTID/_apis/distributedtask/hubs/build/plans/$Env:SYSTEM_PLANID/jobs/$Env:SYSTEM_JOBID/oidctoken?api-version=7.1-preview.1&serviceConnectionId=$awsEndpoint"
119+
$url = $Env:SYSTEM_OIDCREQUESTURI + "?api-version=7.1-preview.1&serviceConnectionId=$awsEndpoint"
120120
$response = Invoke-WebRequest -Uri $url -Method POST -Headers $Headers -Body '{}' -ContentType "application/json" | ConvertFrom-Json
121121
$token = $response.oidcToken
122122

0 commit comments

Comments
 (0)