Skip to content

Commit

Permalink
Onboarding generalized version of VRT for web-components-v3 (#28536)
Browse files Browse the repository at this point in the history
  • Loading branch information
Devjoyti-Barman authored Jul 18, 2023
1 parent 9855323 commit 953dff2
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions azure-pipelines.vrt-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,22 @@ jobs:
- job: VisualRegressionTest_WebComponents
variables:
pipelineId: '315'
pipelineName: 'fluent-ui VRT Pipeline web-components'
pipelineName: 'fluent-ui_VRT_Pipeline_web-components'
workspace:
clean: all
steps:
- checkout: self
fetchDepth: 0

- template: .devops/templates/tools.yml
- template: download-vr-cli.yml

- 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} )
parsedResponse=${response/*"access_token"/}
token=${parsedResponse:3:${#parsedResponse}-5}
curl --location --request POST 'https://vrt-fluentapp.azurewebsites.net/api/policyState' \
curl --location --request POST 'https://vrapprovalfunction-prod.azurewebsites.net/api/policyStateV2' \
--header 'Authorization: Bearer '"$token" \
--header 'Content-Type: application/json' \
--data-raw ' {
Expand All @@ -41,6 +42,7 @@ jobs:
"prId": $(System.PullRequest.PullRequestNumber),
"commitId": "$(Build.SourceVersion)",
"generate":true,
"clientType":"FLUENTUI",
"blockingPipeline":{
},
"nonBlockingPipeline":{
Expand Down Expand Up @@ -79,21 +81,13 @@ jobs:
BASELINE_PIPELINE_ID: $(BASELINE-PIPELINE-ID-WEBCOMPONENTS)
condition: eq(variables['vrTestSkip'], 'no')
- bash: node node_modules/vrscreenshotdiff/lib/index.js pr --clientType "FluentUI-web-components" --buildId $(Build.BuildId) --lkgCIBuild $(LatestBuildId) --pipelineId $(pipelineId) --pipelineName '$(pipelineName)'
- bash: vr-app run-diff --screenshotsDirectory ./screenshots --buildType pr --clientType "FLUENTUI" --ciDefinitionId 214 --groupName $(pipelineName) --locationPrefix 'FluentUI-web-components' --locationPostfix 'vrscreenshotwebcomponents' --pipelineId $(pipelineId) --clientName 'fluentui-web-components-v3' --threshold '0.04' --cumThreshold '1'
displayName: 'Run fluentui-screenshotdiff'
env:
API_URL: $(System.CollectionUri)
API_TOKEN: $(fabric-public-pipeline-access-PAT)
API_REPOSITORY: $(Build.Repository.Name)
API_PROJECT: $(System.TeamProject)
SCREENSHOT_ARTIFACT_FOLDER: vrscreenshotwebcomponents
GITHUB_API_TOKEN: $(githubRepoStatusPAT)
STORAGE_ACCOUNT_FLUENTUI: $(STORAGE-ACCOUNT-FLUENTUI)
STORAGE_KEY_FLUENTUI: $(STORAGE-KEY-BLOB-FLUENTUI)
BLOB_CONNECTION_STRING: $(BLOB-CONNECTION-STRING)
VR_APPROVAL_CLIENT_SECRET: $(VR-APPROVAL-CLIENT-SECRET)
GITHUB_REPO_OWNER: 'microsoft'
GITHUB_REPO_NAME: 'fluentui'
VR_APPROVAL_HOST: $(VR_APPROVAL_HOST)
VR_APP_NAME: $(VR_APP_NAME)
STORAGE_CONNECTION_STRING: $(BLOB-CONNECTION-STRING)
VR_APP_CLIENT_SECRET: $(VR-APPROVAL-CLIENT-SECRET)
VR_APP_CLIENT_ID: $(VR_APP_CLIENT_ID)
VR_APP_API_URL: $(VR_APP_API_URL)
condition: eq(variables['vrTestSkip'], 'no')

0 comments on commit 953dff2

Please sign in to comment.