Skip to content

Commit

Permalink
ci: document vrt migration action
Browse files Browse the repository at this point in the history
  • Loading branch information
Hotell committed Nov 1, 2024
1 parent d159e30 commit 1d6c82b
Showing 1 changed file with 31 additions and 23 deletions.
54 changes: 31 additions & 23 deletions .github/actions/run-publish-vr-screenshot/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,50 +82,58 @@ runs:
name: vrscreenshot${{ inputs.fluentVersion }}
path: screenshots

# ==========================================================
# STEPS BELOW WILL FAIL TO RUN ON GITHUB ACTIONS - see TODOs
# ==========================================================

# TODO: will need Federated Identity to be added to tool similarly like we have for monosize azure plugin https://github.com/microsoft/monosize/blob/main/packages/monosize-storage-azure/src/createTableClient.mts#L27
- name: VR App - Create Policy
if: ${{ env.isPR == 'true' }}
shell: bash
run: |
set -exuo pipefail
npx [email protected] create-policy --nonBlockingPipelines '{"${{ env.pipelineId }}":{"pipelineStatus": "PENDING","pipelineName": "${{ env.pipelineName }}"}}' --clientType 'FLUENTUI'
# env:
# VR_APP_API_URL: ${{ secrets.VR_APP_API_URL }}
# TENANT_ID: ${{ secrets.TenantId }}
# PRINCIPAL_CLIENT_ID: ${{ secrets.PrincipalClientId }}
# SERVICE_CONNECTION_ID: ${{ secrets.ServiceConnectionId }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
env:
VR_APP_API_URL: ${{ secrets.VR_APP_API_URL }}
TENANT_ID: ${{ secrets.TenantId }}
PRINCIPAL_CLIENT_ID: ${{ secrets.PrincipalClientId }}
SERVICE_CONNECTION_ID: ${{ secrets.ServiceConnectionId }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# TODO: will need azure/login@v2 to be added to the workflow {@ling file://./../../workflows/pr-website-deploy-comment.yml#49}
- name: Run screenshotdiff
if: ${{ env.isPR == 'true' && env.vrTestSkip == 'no' }}
uses: azure/cli@v2
env:
# 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
# TODO: not sure how this will be used on GHA cc @evancharlton @TristanWatanabe
CI_DEFINITION_ID: 205
# API_TOKEN: ${{ secrets.fabric-public-pipeline-access-PAT }}
# GITHUB_API_TOKEN: ${{ secrets.githubRepoStatusPAT }}
# VR_APP_API_URL: ${{ secrets.VR_APP_API_URL }}
# STORAGE_ACCOUNT_ID: ${{ secrets.StorageAccountId }}
# TENANT_ID: ${{ secrets.TenantId }}
# PRINCIPAL_CLIENT_ID: ${{ secrets.PrincipalClientId }}
# SERVICE_CONNECTION_ID: ${{ secrets.ServiceConnectionId }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
API_TOKEN: ${{ secrets.fabric-public-pipeline-access-PAT }}
GITHUB_API_TOKEN: ${{ secrets.githubRepoStatusPAT }}
VR_APP_API_URL: ${{ secrets.VR_APP_API_URL }}
STORAGE_ACCOUNT_ID: ${{ secrets.StorageAccountId }}
TENANT_ID: ${{ secrets.TenantId }}
PRINCIPAL_CLIENT_ID: ${{ secrets.PrincipalClientId }}
SERVICE_CONNECTION_ID: ${{ secrets.ServiceConnectionId }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
azcliversion: latest
inlineScript: |
npx [email protected] run-diff --screenshotsDirectory ./screenshots --buildType pr --clientType "FLUENTUI" --ciDefinitionId ${{ env.CI_DEFINITION_ID }} --groupName ${{ env.pipelineName }} --locationPrefix ${{ inputs.locationPrefix }} --locationPostfix ${{ inputs.locationPostfix }} --pipelineId ${{ env.pipelineId }} --clientName ${{ inputs.clientName }} --threshold '0.04' --cumThreshold '1'
# TODO: will need azure/login@v2 to be added to the workflow {@ling file://./../../workflows/pr-website-deploy-comment.yml#49}
- name: Run screenshotdiff - update baseline (non PR)
if: ${{ github.event_name != 'pull_request' }}
uses: azure/cli@v2
# env:
# API_TOKEN: ${{ secrets.fabric-public-pipeline-access-PAT }}
# GITHUB_API_TOKEN: ${{ secrets.githubRepoStatusPAT }}
# VR_APP_API_URL: ${{ secrets.VR_APP_API_URL }}
# STORAGE_ACCOUNT_ID: ${{ secrets.StorageAccountId }}
# TENANT_ID: ${{ secrets.TenantId }}
# PRINCIPAL_CLIENT_ID: ${{ secrets.PrincipalClientId }}
# SERVICE_CONNECTION_ID: ${{ secrets.ServiceConnectionId }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
env:
API_TOKEN: ${{ secrets.fabric-public-pipeline-access-PAT }}
GITHUB_API_TOKEN: ${{ secrets.githubRepoStatusPAT }}
VR_APP_API_URL: ${{ secrets.VR_APP_API_URL }}
STORAGE_ACCOUNT_ID: ${{ secrets.StorageAccountId }}
TENANT_ID: ${{ secrets.TenantId }}
PRINCIPAL_CLIENT_ID: ${{ secrets.PrincipalClientId }}
SERVICE_CONNECTION_ID: ${{ secrets.ServiceConnectionId }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
azcliversion: latest
inlineScript: |
Expand Down

0 comments on commit 1d6c82b

Please sign in to comment.