Skip to content

Commit

Permalink
fix(VRT web-components-v3): update to use environment variable (#29148)
Browse files Browse the repository at this point in the history
* use env variable

* update to use new client url variable
  • Loading branch information
TristanWatanabe committed Sep 14, 2023
1 parent 39453a9 commit 1a62881
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion azure-pipelines.vrt-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

- bash: |
postPolicy="true";
response=$(curl --request POST 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/token' --header 'Content-Type: application/x-www-form-urlencoded' --data-urlencode 'grant_type=client_credentials' --data-urlencode 'client_id=288a69b6-760d-4c1f-ad6d-0183b5e5740f' --data-urlencode 'client_secret='${VR_APPROVAL_CLIENT_SECRET} )
response=$(curl --request POST ${VR_APP_CLIENT_URL} --header 'Content-Type: application/x-www-form-urlencoded' --data-urlencode 'grant_type=client_credentials' --data-urlencode 'client_id='${VR_APP_CLIENT_ID} --data-urlencode 'client_secret='${VR_APPROVAL_CLIENT_SECRET} )
parsedResponse=${response/*"access_token"/}
token=${parsedResponse:3:${#parsedResponse}-5}
curl --location --request POST 'https://vrapprovalfunction-prod.azurewebsites.net/api/policyStateV2' \
Expand Down Expand Up @@ -58,6 +58,8 @@ jobs:
env:
VR_APPROVAL_CLIENT_SECRET: $(VR-APPROVAL-CLIENT-SECRET)
VR_APPROVAL_HOST: $(VR_APPROVAL_HOST)
VR_APP_CLIENT_ID: $(VR_APP_CLIENT_ID)
VR_APP_CLIENT_URL: $(VR_APP_CLIENT_URL)
- template: .devops/templates/runpublishvrscreenshot.yml
parameters:
Expand Down

0 comments on commit 1a62881

Please sign in to comment.