Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 48 additions & 9 deletions azure-pipelines.vrt-baseline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,25 @@ jobs:
vrTestPackageName: '@fluentui/vr-tests-web-components'

@fabricteam fabricteam Jul 18, 2024

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵🏾‍♀️ visual regressions to review in the fluentuiv9 Visual Regression Report

Avatar Converged 1 screenshots
Image Name Diff(in Pixels) Image Type
Avatar Converged.badgeMask - RTL.normal.chromium.png 4 Changed

vrTestPackagePath: 'apps/vr-tests-web-components'

- bash: vr-app run-diff --buildType release --screenshotsDirectory ./screenshots --clientType "FLUENTUI" --locationPrefix 'FluentUI-web-components' --locationPostfix 'vrscreenshotwebcomponents' --pipelineId $(pipelineId)
- task: AzureCLI@2
displayName: 'Run Screenshotdiff update baseline'
env:
API_TOKEN: $(fabric-public-pipeline-access-PAT)
GITHUB_API_TOKEN: $(githubRepoStatusPAT)
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)
STORAGE_ACCOUNT_ID: $(StorageAccountId)
TENANT_ID: $(TenantId)
PRINCIPAL_CLIENT_ID: $(PrincipalClientId)
SERVICE_CONNECTION_ID: $(ServiceConnectionId)
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
inputs:
azureSubscription: $(AzureSubscription)
scriptType: bash
scriptLocation: 'inlineScript'
inlineScript: |
vr-app run-diff --buildType release --screenshotsDirectory ./screenshots --clientType "FLUENTUI" --locationPrefix 'FluentUI-web-components' --locationPostfix 'vrscreenshotwebcomponents' --pipelineId $(pipelineId)

- job: VRToolUpdateBaseline_V9
variables:
Expand All @@ -53,15 +63,25 @@ jobs:
vrTestPackageName: '@fluentui/vr-tests-react-components'
vrTestPackagePath: 'apps/vr-tests-react-components'

- bash: vr-app run-diff --buildType release --screenshotsDirectory ./screenshots --clientType "FLUENTUI" --locationPrefix 'fluentuiv9' --locationPostfix 'vrscreenshotv9' --pipelineId $(pipelineId)
- task: AzureCLI@2
displayName: 'Run Screenshotdiff update baseline'
env:
API_TOKEN: $(fabric-public-pipeline-access-PAT)
GITHUB_API_TOKEN: $(githubRepoStatusPAT)
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)
STORAGE_ACCOUNT_ID: $(StorageAccountId)
TENANT_ID: $(TenantId)
PRINCIPAL_CLIENT_ID: $(PrincipalClientId)
SERVICE_CONNECTION_ID: $(ServiceConnectionId)
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
inputs:
azureSubscription: $(AzureSubscription)
scriptType: bash
scriptLocation: 'inlineScript'
inlineScript: |
vr-app run-diff --buildType release --screenshotsDirectory ./screenshots --clientType "FLUENTUI" --locationPrefix 'fluentuiv9' --locationPostfix 'vrscreenshotv9' --pipelineId $(pipelineId)

- job: VRToolUpdateBaseline_V8
variables:
Expand All @@ -77,16 +97,25 @@ jobs:
vrTestPackageName: '@fluentui/vr-tests'
vrTestPackagePath: 'apps/vr-tests'

- bash: vr-app run-diff --screenshotsDirectory ./screenshots --buildType release --clientType "FLUENTUI" --locationPrefix 'fluentuiv8' --locationPostfix 'vrscreenshotv8' --pipelineId $(pipelineId)
- task: AzureCLI@2
displayName: 'Run fluentui-screenshotdiff'
env:
API_TOKEN: $(fabric-public-pipeline-access-PAT)
GITHUB_API_TOKEN: $(githubRepoStatusPAT)
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)

STORAGE_ACCOUNT_ID: $(StorageAccountId)
TENANT_ID: $(TenantId)
PRINCIPAL_CLIENT_ID: $(PrincipalClientId)
SERVICE_CONNECTION_ID: $(ServiceConnectionId)
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
inputs:
azureSubscription: $(AzureSubscription)
scriptType: bash
scriptLocation: 'inlineScript'
inlineScript: |
vr-app run-diff --screenshotsDirectory ./screenshots --buildType release --clientType "FLUENTUI" --locationPrefix 'fluentuiv8' --locationPostfix 'vrscreenshotv8' --pipelineId $(pipelineId)
- job: VRToolUpdateBaseline_V0
variables:
pipelineId: '313'
Expand All @@ -101,12 +130,22 @@ jobs:
vrTestPackageName: '@fluentui/docs'
vrTestPackagePath: 'packages/fluentui/docs'

- bash: vr-app run-diff --buildType release --screenshotsDirectory ./screenshots --clientType "FLUENTUI" --locationPrefix 'FluentUI-v0' --locationPostfix 'vrscreenshotv0' --pipelineId $(pipelineId)
- task: AzureCLI@2
displayName: 'Run fluentui-screenshotdiff'
env:
API_TOKEN: $(fabric-public-pipeline-access-PAT)
GITHUB_API_TOKEN: $(githubRepoStatusPAT)
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)
STORAGE_ACCOUNT_ID: $(StorageAccountId)
TENANT_ID: $(TenantId)
PRINCIPAL_CLIENT_ID: $(PrincipalClientId)
SERVICE_CONNECTION_ID: $(ServiceConnectionId)
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
inputs:
azureSubscription: $(AzureSubscription)
scriptType: bash
scriptLocation: 'inlineScript'
inlineScript: |
vr-app run-diff --buildType release --screenshotsDirectory ./screenshots --clientType "FLUENTUI" --locationPrefix 'FluentUI-v0' --locationPostfix 'vrscreenshotv0' --pipelineId $(pipelineId)
95 changes: 66 additions & 29 deletions azure-pipelines.vrt-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ jobs:

- bash: |
postPolicy="true";
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} )
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} )
parsedResponse=${response/*"access_token"/}
token=${parsedResponse:3:${#parsedResponse}-5}
curl --location --request POST 'https://vrapprovalfunction-prod.azurewebsites.net/api/policyStateV2' \
curl --location --request POST 'https://vrtfunctionappv0.azurewebsites.net/api/policyStateV2' \
--header 'Authorization: Bearer '"$token" \
--header 'Content-Type: application/json' \
--data-raw ' {
Expand All @@ -56,7 +56,6 @@ jobs:
}'
displayName: 'Call policy State Api'
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)
Expand All @@ -66,16 +65,26 @@ jobs:
fluentVersion: webcomponents
vrTestPackageName: '@fluentui/vr-tests-web-components'
vrTestPackagePath: 'apps/vr-tests-web-components'
# ciDefinitionId is set to 205 because that is the ID of the baseline pipeline (https://uifabric.visualstudio.com/fabricpublic/_build?definitionId=205) used by the master branch
- bash: vr-app run-diff --screenshotsDirectory ./screenshots --buildType pr --clientType "FLUENTUI" --ciDefinitionId 205 --groupName $(pipelineName) --locationPrefix 'FluentUI-web-components' --locationPostfix 'vrscreenshotwebcomponents' --pipelineId $(pipelineId) --clientName 'fluentui-web-components-v3' --threshold '0.04' --cumThreshold '1'
displayName: 'Run fluentui-screenshotdiff'

- task: AzureCLI@2
displayName: 'Run Snapshot Diffing'
env:
API_TOKEN: $(fabric-public-pipeline-access-PAT)
GITHUB_API_TOKEN: $(githubRepoStatusPAT)
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)
VR_APP_API_URL: $(VR_APP_API_URL_NEW)
STORAGE_ACCOUNT_ID: $(StorageAccountId)
TENANT_ID: $(TenantId)
PRINCIPAL_CLIENT_ID: $(PrincipalClientId)
SERVICE_CONNECTION_ID: $(ServiceConnectionId)
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
inputs:
azureSubscription: $(AzureSubscription)
scriptType: bash
scriptLocation: 'inlineScript'
inlineScript: |
vr-app run-diff --screenshotsDirectory ./screenshots --buildType pr --clientType "FLUENTUI" --ciDefinitionId 205 --groupName $(pipelineName) --locationPrefix 'FluentUI-web-components' --locationPostfix 'vrscreenshotwebcomponents' --pipelineId $(pipelineId) --clientName 'fluentui-web-components-v3' --threshold '0.04' --cumThreshold '1'
condition: eq(variables['vrTestSkip'], 'no')

- job: VisualRegressionTest_V9
Expand All @@ -95,10 +104,10 @@ jobs:

- bash: |
postPolicy="true";
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} )
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} )
parsedResponse=${response/*"access_token"/}
token=${parsedResponse:3:${#parsedResponse}-5}
curl --location --request POST 'https://vrapprovalfunction-prod.azurewebsites.net/api/policyStateV2' \
curl --location --request POST 'https://vrtfunctionappv0.azurewebsites.net/api/policyStateV2' \
--header 'Authorization: Bearer '"$token" \
--header 'Content-Type: application/json' \
--data-raw ' {
Expand All @@ -121,7 +130,6 @@ jobs:
}'
displayName: 'Call policy State Api'
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)
Expand All @@ -132,15 +140,25 @@ jobs:
vrTestPackageName: '@fluentui/vr-tests-react-components'
vrTestPackagePath: 'apps/vr-tests-react-components'

- bash: vr-app run-diff --buildType pr --screenshotsDirectory ./screenshots --clientType "FLUENTUI" --ciDefinitionId 205 --groupName $(pipelineName) --locationPrefix 'fluentuiv9' --locationPostfix 'vrscreenshotv9' --pipelineId $(pipelineId) --clientName 'fluentuiv9' --threshold '0.04' --cumThreshold '1'
displayName: 'Run fluentui-screenshotdiff'
- task: AzureCLI@2
displayName: 'Run Snapshot Diffing'
env:
API_TOKEN: $(fabric-public-pipeline-access-PAT)
GITHUB_API_TOKEN: $(githubRepoStatusPAT)
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)
VR_APP_API_URL: $(VR_APP_API_URL_NEW)
STORAGE_ACCOUNT_ID: $(StorageAccountId)
TENANT_ID: $(TenantId)
PRINCIPAL_CLIENT_ID: $(PrincipalClientId)
SERVICE_CONNECTION_ID: $(ServiceConnectionId)
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
inputs:
azureSubscription: $(AzureSubscription)
scriptType: bash
scriptLocation: 'inlineScript'
inlineScript: |
vr-app run-diff --buildType pr --screenshotsDirectory ./screenshots --clientType "FLUENTUI" --ciDefinitionId 205 --groupName $(pipelineName) --locationPrefix 'fluentuiv9' --locationPostfix 'vrscreenshotv9' --pipelineId $(pipelineId) --clientName 'fluentuiv9' --threshold '0.04' --cumThreshold '1'
condition: eq(variables['vrTestSkip'], 'no')

- job: VisualRegressionTest_V8
Expand All @@ -159,10 +177,10 @@ jobs:

- bash: |
postPolicy="true";
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} )
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} )
parsedResponse=${response/*"access_token"/}
token=${parsedResponse:3:${#parsedResponse}-5}
curl --location --request POST 'https://vrapprovalfunction-prod.azurewebsites.net/api/policyStateV2' \
curl --location --request POST 'https://vrtfunctionappv0.azurewebsites.net/api/policyStateV2' \
--header 'Authorization: Bearer '"$token" \
--header 'Content-Type: application/json' \
--data-raw ' {
Expand All @@ -185,7 +203,6 @@ jobs:
}'
displayName: 'Call policy State Api'
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)
Expand All @@ -196,15 +213,25 @@ jobs:
vrTestPackageName: '@fluentui/vr-tests'
vrTestPackagePath: 'apps/vr-tests'

- bash: vr-app run-diff --screenshotsDirectory ./screenshots --buildType pr --clientType "FLUENTUI" --ciDefinitionId 205 --groupName $(pipelineName) --locationPrefix 'fluentuiv8' --locationPostfix 'vrscreenshotv8' --pipelineId $(pipelineId) --clientName 'fluentuiv8' --threshold '0.04' --cumThreshold '1'
displayName: 'Run fluentui-screenshotdiff'
- task: AzureCLI@2
displayName: 'Run Snapshot Diffing'
env:
API_TOKEN: $(fabric-public-pipeline-access-PAT)
GITHUB_API_TOKEN: $(githubRepoStatusPAT)
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)
VR_APP_API_URL: $(VR_APP_API_URL_NEW)
STORAGE_ACCOUNT_ID: $(StorageAccountId)
TENANT_ID: $(TenantId)
PRINCIPAL_CLIENT_ID: $(PrincipalClientId)
SERVICE_CONNECTION_ID: $(ServiceConnectionId)
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
inputs:
azureSubscription: $(AzureSubscription)
scriptType: bash
scriptLocation: 'inlineScript'
inlineScript: |
vr-app run-diff --screenshotsDirectory ./screenshots --buildType pr --clientType "FLUENTUI" --ciDefinitionId 205 --groupName $(pipelineName) --locationPrefix 'fluentuiv8' --locationPostfix 'vrscreenshotv8' --pipelineId $(pipelineId) --clientName 'fluentuiv8' --threshold '0.04' --cumThreshold '1'
condition: eq(variables['vrTestSkip'], 'no')

- job: VisualRegressionTest_V0
Expand All @@ -224,10 +251,10 @@ jobs:

- bash: |
postPolicy="true";
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} )
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' \
curl --location --request POST 'https://vrtfunctionappv0.azurewebsites.net/api/policyStateV2' \
--header 'Authorization: Bearer '"$token" \
--header 'Content-Type: application/json' \
--data-raw ' {
Expand All @@ -250,8 +277,8 @@ jobs:
}'
displayName: 'Call policy State Api'
env:
VR_APPROVAL_CLIENT_SECRET: $(VR-APPROVAL-CLIENT-SECRET)
VR_APP_CLIENT_ID: $(VR_APP_CLIENT_ID)
VR_APPROVAL_CLIENT_SECRET: $(VR-APPROVAL-CLIENT-SECRET)
VR_APP_CLIENT_URL: $(VR_APP_CLIENT_URL)

- template: .devops/templates/runpublishvrscreenshot.yml
Expand All @@ -260,13 +287,23 @@ jobs:
vrTestPackageName: '@fluentui/docs'
vrTestPackagePath: 'packages/fluentui/docs'

- bash: vr-app run-diff --buildType pr --screenshotsDirectory ./screenshots --clientType "FLUENTUI" --ciDefinitionId 205 --groupName $(pipelineName) --locationPrefix 'FluentUI-v0' --locationPostfix 'vrscreenshotv0' --pipelineId $(pipelineId) --clientName 'FluentUIV0' --threshold '0.04' --cumThreshold '1'
displayName: 'Run fluentui-screenshotdiff'
- task: AzureCLI@2
displayName: 'Run Snapshot Diffing'
env:
API_TOKEN: $(fabric-public-pipeline-access-PAT)
GITHUB_API_TOKEN: $(githubRepoStatusPAT)
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)
VR_APP_API_URL: $(VR_APP_API_URL_NEW)
STORAGE_ACCOUNT_ID: $(StorageAccountId)
TENANT_ID: $(TenantId)
PRINCIPAL_CLIENT_ID: $(PrincipalClientId)
SERVICE_CONNECTION_ID: $(ServiceConnectionId)
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
inputs:
azureSubscription: $(AzureSubscription)
scriptType: bash
scriptLocation: 'inlineScript'
inlineScript: |
vr-app run-diff --buildType pr --screenshotsDirectory ./screenshots --clientType "FLUENTUI" --ciDefinitionId 205 --groupName $(pipelineName) --locationPrefix 'FluentUI-v0' --locationPostfix 'vrscreenshotv0' --pipelineId $(pipelineId) --clientName 'FluentUIV0' --threshold '0.04' --cumThreshold '1'
condition: eq(variables['vrTestSkip'], 'no')
2 changes: 1 addition & 1 deletion download-vr-cli.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
steps:
- bash: |
set -exuo pipefail
npm install -g vr-approval-cli@0.0.168
npm install -g vr-approval-cli@0.4.3
Comment thread
Malleshnayak marked this conversation as resolved.
displayName: Download VR App CLI
retryCountOnTaskFailure: 3