Skip to content

Commit

Permalink
ci(vrt): install vr-app as part of standard yarn install and remedy n…
Browse files Browse the repository at this point in the history
…ecessary duplication (#32048)
  • Loading branch information
Hotell authored Jul 22, 2024
1 parent ba0b6c5 commit 5333195
Show file tree
Hide file tree
Showing 5 changed files with 431 additions and 325 deletions.
12 changes: 4 additions & 8 deletions azure-pipelines.vrt-baseline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
clean: all
steps:
- template: .devops/templates/tools.yml
- template: download-vr-cli.yml
- template: .devops/templates/runpublishvrscreenshot.yml
parameters:
fluentVersion: webcomponents
Expand All @@ -47,7 +46,7 @@ jobs:
scriptType: bash
scriptLocation: 'inlineScript'
inlineScript: |
vr-app run-diff --buildType release --screenshotsDirectory ./screenshots --clientType "FLUENTUI" --locationPrefix 'FluentUI-web-components' --locationPostfix 'vrscreenshotwebcomponents' --pipelineId $(pipelineId)
yarn vr-app run-diff --buildType release --screenshotsDirectory ./screenshots --clientType "FLUENTUI" --locationPrefix 'FluentUI-web-components' --locationPostfix 'vrscreenshotwebcomponents' --pipelineId $(pipelineId)
- job: VRToolUpdateBaseline_V9
variables:
Expand All @@ -56,7 +55,6 @@ jobs:
clean: all
steps:
- template: .devops/templates/tools.yml
- template: download-vr-cli.yml
- template: .devops/templates/runpublishvrscreenshot.yml
parameters:
fluentVersion: v9
Expand All @@ -81,7 +79,7 @@ jobs:
scriptType: bash
scriptLocation: 'inlineScript'
inlineScript: |
vr-app run-diff --buildType release --screenshotsDirectory ./screenshots --clientType "FLUENTUI" --locationPrefix 'fluentuiv9' --locationPostfix 'vrscreenshotv9' --pipelineId $(pipelineId)
yarn vr-app run-diff --buildType release --screenshotsDirectory ./screenshots --clientType "FLUENTUI" --locationPrefix 'fluentuiv9' --locationPostfix 'vrscreenshotv9' --pipelineId $(pipelineId)
- job: VRToolUpdateBaseline_V8
variables:
Expand All @@ -90,7 +88,6 @@ jobs:
clean: all
steps:
- template: .devops/templates/tools.yml
- template: download-vr-cli.yml
- template: .devops/templates/runpublishvrscreenshot.yml
parameters:
fluentVersion: v8
Expand All @@ -115,15 +112,14 @@ jobs:
scriptType: bash
scriptLocation: 'inlineScript'
inlineScript: |
vr-app run-diff --screenshotsDirectory ./screenshots --buildType release --clientType "FLUENTUI" --locationPrefix 'fluentuiv8' --locationPostfix 'vrscreenshotv8' --pipelineId $(pipelineId)
yarn vr-app run-diff --screenshotsDirectory ./screenshots --buildType release --clientType "FLUENTUI" --locationPrefix 'fluentuiv8' --locationPostfix 'vrscreenshotv8' --pipelineId $(pipelineId)
- job: VRToolUpdateBaseline_V0
variables:
pipelineId: '313'
workspace:
clean: all
steps:
- template: .devops/templates/tools.yml
- template: download-vr-cli.yml
- template: .devops/templates/runpublishvrscreenshot.yml
parameters:
fluentVersion: v0
Expand All @@ -148,4 +144,4 @@ jobs:
scriptType: bash
scriptLocation: 'inlineScript'
inlineScript: |
vr-app run-diff --buildType release --screenshotsDirectory ./screenshots --clientType "FLUENTUI" --locationPrefix 'FluentUI-v0' --locationPostfix 'vrscreenshotv0' --pipelineId $(pipelineId)
yarn vr-app run-diff --buildType release --screenshotsDirectory ./screenshots --clientType "FLUENTUI" --locationPrefix 'FluentUI-v0' --locationPostfix 'vrscreenshotv0' --pipelineId $(pipelineId)
19 changes: 8 additions & 11 deletions azure-pipelines.vrt-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
fetchDepth: 0

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

- bash: |
postPolicy="true";
Expand Down Expand Up @@ -84,8 +83,9 @@ jobs:
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: |
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'
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')

- job: VisualRegressionTest_V9
Expand All @@ -101,8 +101,6 @@ jobs:

- template: .devops/templates/tools.yml

- template: download-vr-cli.yml

- 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} )
Expand Down Expand Up @@ -159,8 +157,9 @@ jobs:
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: |
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'
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')

- job: VisualRegressionTest_V8
Expand All @@ -175,8 +174,6 @@ jobs:

- template: .devops/templates/tools.yml

- template: download-vr-cli.yml

- 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})
Expand Down Expand Up @@ -233,8 +230,9 @@ jobs:
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: |
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'
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')

- job: VisualRegressionTest_V0
Expand All @@ -250,8 +248,6 @@ jobs:

- template: .devops/templates/tools.yml

- template: download-vr-cli.yml

- 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})
Expand Down Expand Up @@ -307,6 +303,7 @@ jobs:
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: |
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'
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')
6 changes: 0 additions & 6 deletions download-vr-cli.yml

This file was deleted.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@
"@react-native/babel-preset": "0.73.21",
"@rnx-kit/eslint-plugin": "0.4.2",
"@rollup/plugin-node-resolve": "13.3.0",
"@storybook/addons": "6.5.15",
"@storybook/addon-a11y": "6.5.15",
"@storybook/addon-actions": "6.5.15",
"@storybook/addon-docs": "6.5.15",
"@storybook/addon-essentials": "6.5.15",
"@storybook/addon-knobs": "6.4.0",
"@storybook/addon-links": "6.5.15",
"@storybook/addons": "6.5.15",
"@storybook/builder-webpack5": "6.5.15",
"@storybook/client-api": "6.5.15",
"@storybook/components": "6.5.15",
Expand Down Expand Up @@ -303,6 +303,7 @@
"react-window": "^1.8.6",
"read-pkg-up": "7.0.1",
"replace-in-file": "6.1.0",
"request": "2.88.2",
"request-promise-native": "1.0.9",
"resolve": "1.22.8",
"riceburn": "1.3.1",
Expand Down Expand Up @@ -336,10 +337,10 @@
"ts-node": "10.9.1",
"tsconfig-paths": "4.2.0",
"tsconfig-paths-webpack-plugin": "4.1.0",
"tslib": "2.5.0",
"tslib": "2.6.3",
"typescript": "5.0.4",
"vinyl": "2.2.0",
"vrscreenshotdiff": "0.0.17",
"vr-approval-cli": "0.4.4",
"webpack": "5.90.3",
"webpack-bundle-analyzer": "4.10.1",
"webpack-cli": "5.1.4",
Expand Down
Loading

0 comments on commit 5333195

Please sign in to comment.