From 953dff23c1bfebc5686bba953f70d453e143dc82 Mon Sep 17 00:00:00 2001 From: Devjoyti Barman <53661347+Devjoyti-Barman@users.noreply.github.com> Date: Tue, 18 Jul 2023 21:40:59 +0530 Subject: [PATCH] Onboarding generalized version of VRT for web-components-v3 (#28536) --- azure-pipelines.vrt-pr.yml | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/azure-pipelines.vrt-pr.yml b/azure-pipelines.vrt-pr.yml index c94bf052bc481..20e69acd3ddd5 100644 --- a/azure-pipelines.vrt-pr.yml +++ b/azure-pipelines.vrt-pr.yml @@ -18,7 +18,7 @@ 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: @@ -26,13 +26,14 @@ jobs: 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 ' { @@ -41,6 +42,7 @@ jobs: "prId": $(System.PullRequest.PullRequestNumber), "commitId": "$(Build.SourceVersion)", "generate":true, + "clientType":"FLUENTUI", "blockingPipeline":{ }, "nonBlockingPipeline":{ @@ -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')