Skip to content

Commit

Permalink
proxy-agent - get PAT (#4858)
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisRumyantsev committed Jun 20, 2024
1 parent e38036c commit 559a6d2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .azure-pipelines/get-pat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
steps:
- task: AzureCLI@2
inputs:
azureSubscription: ARM - WIF - manual
scriptType: pscore
scriptLocation: inlineScript
inlineScript: |
az account set --subscription $(SUBSCRIPTION_ID)
$accessToken = az account get-access-token --resource $(RESOURCE_ID) --query accessToken --output tsv
echo "##vso[task.setvariable variable=ACCESS_TOKEN;issecret=true]$accessToken"
displayName: Get Access Token
3 changes: 2 additions & 1 deletion .azure-pipelines/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ extends:
nugetMultiFeedWarnLevel: none
timeoutInMinutes: 300
steps:
- template: /.azure-pipelines/get-pat.yml@self
- bash: |
cd ./.azure-pipelines/scripts/
npm install axios minimist
Expand All @@ -123,7 +124,7 @@ extends:
node ./run-and-verify.js \
--projectUrl "$(CANARY_PROJECT_URL)" \
--pipelineId "$(CANARY_PIPELINE_ID)" \
--token "$(CANARY_PAT)" \
--token "$(ACCESS_TOKEN)" \
--templateParameters "{ \"branch\": \"${branch}\" }"
displayName: Test Proxy Agent
Expand Down

0 comments on commit 559a6d2

Please sign in to comment.