Skip to content
Merged
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
42 changes: 42 additions & 0 deletions .devops/templates/runpublishvrscreenshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ parameters:
- name: vrTestPackagePath
type: string
default: 'apps/vr-tests'
- name: locationPrefix
type: string
default: fluentuiv8
- name: locationPostfix
type: string
default: vrscreenshotv8
- name: clientName
type: string
default: fluentuiv8

steps:
- task: Bash@3
Expand All @@ -22,6 +31,7 @@ steps:
- script: |
Comment thread
TristanWatanabe marked this conversation as resolved.
isPR=${{lower(eq(variables['Build.Reason'], 'PullRequest'))}}
echo $isPR
echo "##vso[task.setvariable variable=isPR;]$isPR"
if [[ $isPR == true ]]; then
packageAffected=$(yarn --silent check:affected --package ${{ parameters.vrTestPackageName }})
if [[ $packageAffected == false ]]; then
Expand Down Expand Up @@ -54,3 +64,35 @@ steps:
ArtifactName: 'vrscreenshot${{ parameters.fluentVersion }}'
publishLocation: 'Container'
condition: eq(variables['vrTestSkip'], 'no')

- bash: |
set -exuo pipefail
yarn vr-app create-policy --nonBlockingPipelines '{"$(pipelineId)":{"pipelineStatus": "PENDING","pipelineName": "$(pipelineName)"}}' --clientType 'FLUENTUI'
displayName: VR App - Create Policy
env:
VR_APP_API_URL: $(VR_APP_API_URL)
TENANT_ID: $(TenantId)
PRINCIPAL_CLIENT_ID: $(PrincipalClientId)
SERVICE_CONNECTION_ID: $(ServiceConnectionId)
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
condition: eq(variables.isPR, true)

- task: AzureCLI@2
displayName: 'Run fluentui-screenshotdiff'
env:
API_TOKEN: $(fabric-public-pipeline-access-PAT)
GITHUB_API_TOKEN: $(githubRepoStatusPAT)
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'
# 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
inlineScript: |
yarn vr-app run-diff --screenshotsDirectory ./screenshots --buildType pr --clientType "FLUENTUI" --ciDefinitionId 205 --groupName $(pipelineName) --locationPrefix ${{ parameters.locationPrefix }} --locationPostfix ${{ parameters.locationPostfix }} --pipelineId $(pipelineId) --clientName ${{ parameters.clientName }} --threshold '0.04' --cumThreshold '1'
condition: and(eq(variables.isPR, true), eq(variables['vrTestSkip'], 'no'))
136 changes: 12 additions & 124 deletions azure-pipelines.vrt-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,37 +32,9 @@ jobs:
fluentVersion: webcomponents
vrTestPackageName: '@fluentui/vr-tests-web-components'
vrTestPackagePath: 'apps/vr-tests-web-components'

- bash: |
set -exuo pipefail
yarn vr-app create-policy --nonBlockingPipelines '{"$(pipelineId)":{"pipelineStatus": "PENDING","pipelineName": "$(pipelineName)"}}' --clientType 'FLUENTUI'
displayName: VR App - Create Policy
env:
VR_APP_API_URL: $(VR_APP_API_URL)
TENANT_ID: $(TenantId)
PRINCIPAL_CLIENT_ID: $(PrincipalClientId)
SERVICE_CONNECTION_ID: $(ServiceConnectionId)
SYSTEM_ACCESSTOKEN: $(System.AccessToken)

- task: AzureCLI@2
displayName: 'Run fluentui-screenshotdiff'
env:
API_TOKEN: $(fabric-public-pipeline-access-PAT)
GITHUB_API_TOKEN: $(githubRepoStatusPAT)
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'
# 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
inlineScript: |
yarn 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')
locationPrefix: 'FluentUI-web-components'
locationPostfix: 'vrscreenshotwebcomponents'
clientName: 'fluentui-web-components-v3'

- job: VisualRegressionTest_V9
variables:
Expand All @@ -82,37 +54,9 @@ jobs:
fluentVersion: v9
vrTestPackageName: '@fluentui/vr-tests-react-components'
vrTestPackagePath: 'apps/vr-tests-react-components'

- bash: |
set -exuo pipefail
yarn vr-app create-policy --nonBlockingPipelines '{"$(pipelineId)":{"pipelineStatus": "PENDING","pipelineName": "$(pipelineName)"}}' --clientType 'FLUENTUI'
displayName: VR App - Create Policy
env:
VR_APP_API_URL: $(VR_APP_API_URL)
TENANT_ID: $(TenantId)
PRINCIPAL_CLIENT_ID: $(PrincipalClientId)
SERVICE_CONNECTION_ID: $(ServiceConnectionId)
SYSTEM_ACCESSTOKEN: $(System.AccessToken)

- task: AzureCLI@2
displayName: 'Run fluentui-screenshotdiff'
env:
API_TOKEN: $(fabric-public-pipeline-access-PAT)
GITHUB_API_TOKEN: $(githubRepoStatusPAT)
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'
# 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
inlineScript: |
yarn 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')
locationPrefix: 'fluentuiv9'
locationPostfix: 'vrscreenshotv9'
clientName: 'fluentuiv9'

- job: VisualRegressionTest_V8
variables:
Expand All @@ -131,37 +75,9 @@ jobs:
fluentVersion: v8
vrTestPackageName: '@fluentui/vr-tests'
vrTestPackagePath: 'apps/vr-tests'

- bash: |
set -exuo pipefail
yarn vr-app create-policy --nonBlockingPipelines '{"$(pipelineId)":{"pipelineStatus": "PENDING","pipelineName": "$(pipelineName)"}}' --clientType 'FLUENTUI'
displayName: VR App - Create Policy
env:
VR_APP_API_URL: $(VR_APP_API_URL)
TENANT_ID: $(TenantId)
PRINCIPAL_CLIENT_ID: $(PrincipalClientId)
SERVICE_CONNECTION_ID: $(ServiceConnectionId)
SYSTEM_ACCESSTOKEN: $(System.AccessToken)

Comment thread
TristanWatanabe marked this conversation as resolved.
- task: AzureCLI@2
displayName: 'Run fluentui-screenshotdiff'
env:
API_TOKEN: $(fabric-public-pipeline-access-PAT)
GITHUB_API_TOKEN: $(githubRepoStatusPAT)
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'
# 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
inlineScript: |
yarn 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')
locationPrefix: 'fluentuiv8'
locationPostfix: 'vrscreenshotv8'
clientName: 'fluentuiv8'

- job: VisualRegressionTest_V0
variables:
Expand All @@ -181,34 +97,6 @@ jobs:
fluentVersion: v0
vrTestPackageName: '@fluentui/docs'
vrTestPackagePath: 'packages/fluentui/docs'

- bash: |
set -exuo pipefail
yarn vr-app create-policy --nonBlockingPipelines '{"$(pipelineId)":{"pipelineStatus": "PENDING","pipelineName": "$(pipelineName)"}}' --clientType 'FLUENTUI'
displayName: VR App - Create Policy
env:
VR_APP_API_URL: $(VR_APP_API_URL)
TENANT_ID: $(TenantId)
PRINCIPAL_CLIENT_ID: $(PrincipalClientId)
SERVICE_CONNECTION_ID: $(ServiceConnectionId)
SYSTEM_ACCESSTOKEN: $(System.AccessToken)

- task: AzureCLI@2
displayName: 'Run fluentui-screenshotdiff'
env:
API_TOKEN: $(fabric-public-pipeline-access-PAT)
GITHUB_API_TOKEN: $(githubRepoStatusPAT)
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'
# 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
inlineScript: |
yarn 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')
locationPrefix: 'FluentUI-v0'
locationPostfix: 'vrscreenshotv0'
clientName: 'FluentUIV0'