Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
179 changes: 48 additions & 131 deletions azure-pipelines.vrt-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,45 +27,24 @@ jobs:

Comment thread
TristanWatanabe marked this conversation as resolved.
- template: .devops/templates/tools.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})
parsedResponse=${response/*"access_token"/}
token=${parsedResponse:3:${#parsedResponse}-5}
curl --location --request POST 'https://vrtfunctionappv0.azurewebsites.net/api/policyStateV2' \
--header 'Authorization: Bearer '"$token" \
--header 'Content-Type: application/json' \
--data-raw ' {
"organization": "uifabric",
"projectName": "fabricpublic",
"prId": $(System.PullRequest.PullRequestNumber),
"commitId": "$(Build.SourceVersion)",
"generate":true,
"clientType":"FLUENTUI",
"blockingPipeline":{
},
"nonBlockingPipeline":{
"$(pipelineId)": {
"pipelineStatus": "PENDING",
"pipelineName": "$(pipelineName)"
}
},
"postPolicy": '${postPolicy}',
"policyType": "OPTIONAL"
}'
displayName: 'Call policy State Api'
env:
VR_APPROVAL_HOST: $(VR_APPROVAL_HOST)
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
parameters:
fluentVersion: webcomponents
vrTestPackageName: '@fluentui/vr-tests-web-components'
vrTestPackagePath: 'apps/vr-tests-web-components'

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

- task: AzureCLI@2
displayName: 'Run fluentui-screenshotdiff'
env:
Expand Down Expand Up @@ -101,45 +80,24 @@ jobs:

- template: .devops/templates/tools.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} )
parsedResponse=${response/*"access_token"/}
token=${parsedResponse:3:${#parsedResponse}-5}
curl --location --request POST 'https://vrtfunctionappv0.azurewebsites.net/api/policyStateV2' \
--header 'Authorization: Bearer '"$token" \
--header 'Content-Type: application/json' \
--data-raw ' {
"organization": "uifabric",
"projectName": "fabricpublic",
"prId": $(System.PullRequest.PullRequestNumber),
"commitId": "$(Build.SourceVersion)",
"generate":true,
"clientType":"FLUENTUI",
"blockingPipeline":{
},
"nonBlockingPipeline":{
"$(pipelineId)": {
"pipelineStatus": "PENDING",
"pipelineName": "$(pipelineName)"
}
},
"postPolicy": '${postPolicy}',
"policyType": "OPTIONAL"
}'
displayName: 'Call policy State Api'
env:
VR_APPROVAL_HOST: $(VR_APPROVAL_HOST)
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
parameters:
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_CLIENT_ID: $(VR_APP_CLIENT_ID)
VR_APP_API_URL: $(VR_APP_API_URL_NEW)
TENANT_ID: $(TenantId)
PRINCIPAL_CLIENT_ID: $(PrincipalClientId)
SERVICE_CONNECTION_ID: $(ServiceConnectionId)
SYSTEM_ACCESSTOKEN: $(System.AccessToken)

- task: AzureCLI@2
displayName: 'Run fluentui-screenshotdiff'
env:
Expand Down Expand Up @@ -174,45 +132,24 @@ jobs:

- template: .devops/templates/tools.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})
parsedResponse=${response/*"access_token"/}
token=${parsedResponse:3:${#parsedResponse}-5}
curl --location --request POST 'https://vrtfunctionappv0.azurewebsites.net/api/policyStateV2' \
--header 'Authorization: Bearer '"$token" \
--header 'Content-Type: application/json' \
--data-raw ' {
"organization": "uifabric",
"projectName": "fabricpublic",
"prId": $(System.PullRequest.PullRequestNumber),
"commitId": "$(Build.SourceVersion)",
"generate":true,
"clientType":"FLUENTUI",
"blockingPipeline":{
},
"nonBlockingPipeline":{
"$(pipelineId)": {
"pipelineStatus": "PENDING",
"pipelineName": "$(pipelineName)"
}
},
"postPolicy": '${postPolicy}',
"policyType": "OPTIONAL"
}'
displayName: 'Call policy State Api'
env:
VR_APPROVAL_HOST: $(VR_APPROVAL_HOST)
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
parameters:
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_CLIENT_ID: $(VR_APP_CLIENT_ID)
VR_APP_API_URL: $(VR_APP_API_URL_NEW)
TENANT_ID: $(TenantId)
PRINCIPAL_CLIENT_ID: $(PrincipalClientId)
SERVICE_CONNECTION_ID: $(ServiceConnectionId)
SYSTEM_ACCESSTOKEN: $(System.AccessToken)

- task: AzureCLI@2
displayName: 'Run fluentui-screenshotdiff'
env:
Expand Down Expand Up @@ -248,44 +185,24 @@ jobs:

- template: .devops/templates/tools.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})
parsedResponse=${response/*"access_token"/}
token=${parsedResponse:3:${#parsedResponse}-5}
curl --location --request POST 'https://vrtfunctionappv0.azurewebsites.net/api/policyStateV2' \
--header 'Authorization: Bearer '"$token" \
--header 'Content-Type: application/json' \
--data-raw ' {
"organization": "uifabric",
"projectName": "fabricpublic",
"prId": $(System.PullRequest.PullRequestNumber),
"commitId": "$(Build.SourceVersion)",
"generate":true,
"clientType":"FLUENTUI",
"blockingPipeline":{
},
"nonBlockingPipeline":{
"$(pipelineId)": {
"pipelineStatus": "PENDING",
"pipelineName": "$(pipelineName)"
}
},
"postPolicy": '${postPolicy}',
"policyType": "OPTIONAL"
}'
displayName: 'Call policy State Api'
env:
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
parameters:
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_CLIENT_ID: $(VR_APP_CLIENT_ID)
VR_APP_API_URL: $(VR_APP_API_URL_NEW)
TENANT_ID: $(TenantId)
PRINCIPAL_CLIENT_ID: $(PrincipalClientId)
SERVICE_CONNECTION_ID: $(ServiceConnectionId)
SYSTEM_ACCESSTOKEN: $(System.AccessToken)

- task: AzureCLI@2
displayName: 'Run fluentui-screenshotdiff'
env:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@
"tslib": "2.6.3",
"typescript": "5.0.4",
"vinyl": "2.2.0",
"vr-approval-cli": "0.4.4",
"vr-approval-cli": "0.4.5",
"webpack": "5.90.3",
"webpack-bundle-analyzer": "4.10.1",
"webpack-cli": "5.1.4",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -24603,10 +24603,10 @@ vm-browserify@^1.0.1:
resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0"
integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==

vr-approval-cli@0.4.4:
version "0.4.4"
resolved "https://registry.yarnpkg.com/vr-approval-cli/-/vr-approval-cli-0.4.4.tgz#a9377056996a69e2d54fa561118abdf599bab458"
integrity sha512-rQ3nFyHds7gy1paVb1pkQJVJuzf2CJyzvq2g4x1Qe9JQHSgAWITdpD0tfPTvCuwLh6JcZ3z3hTr+sTSHg5976Q==
vr-approval-cli@0.4.5:
version "0.4.5"
resolved "https://registry.yarnpkg.com/vr-approval-cli/-/vr-approval-cli-0.4.5.tgz#315b5708f5a6cd6750887f5983f125dbe2d51169"
integrity sha512-ahZrf0WphWSx3YZ9JtYCO+FCxAuTmryg035k4Nv3DAZV01KjNrXrk8qfRu/uo2NdTizNUjx483pkeZkgihGHXA==
dependencies:
"@azure/identity" "^4.3.0"
"@azure/storage-blob" "12.11.0"
Expand Down