Skip to content

Commit

Permalink
ci(v8 release): migrate v8 docsite release to yaml (#32820)
Browse files Browse the repository at this point in the history
  • Loading branch information
TristanWatanabe authored Sep 13, 2024
1 parent b5f5ef0 commit 62f0ffc
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .devops/templates/publish-website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
parameters:
- name: version
type: string
default: 8

steps:
- task: AzureCLI@2
displayName: 'Copy website drop to Azure'
inputs:
azureSubscription: 'Azure - fabricweb storage - NEW'
scriptType: 'bash'
scriptLocation: inlineScript
inlineScript: |
az storage blob upload-batch \
--destination 'fabric-website' \
--source $(System.DefaultWorkingDirectory)/apps/public-docsite/dist \
--account-name fabricweb \
--destination-path v${{ parameters.version }}/$(Build.BuildNumber)/ \
--auth-mode login \
--overwrite
- task: AzureCLI@2
displayName: 'Update dogfood manifest in Azure blob'
inputs:
azureSubscription: 'Azure - fabricweb storage - NEW'
scriptType: 'bash'
scriptLocation: inlineScript
inlineScript: |
az storage blob upload \
--account-name fabricweb \
--container-name fabric-website \
--name manifests/v${{ parameters.version }}-df.js \
--file $(System.DefaultWorkingDirectory)/site-manifests/v${{ parameters.version }}-df.js \
--auth-mode login \
--overwrite
- task: AzureCLI@2
displayName: 'Update prod manifest in Azure blob'
inputs:
azureSubscription: 'Azure - fabricweb storage - NEW'
scriptType: 'bash'
scriptLocation: inlineScript
inlineScript: |
az storage blob upload \
--account-name fabricweb \
--container-name fabric-website \
--name manifests/v${{ parameters.version }}-prod.js \
--file $(System.DefaultWorkingDirectory)/site-manifests/v${{ parameters.version }}-prod.js \
--auth-mode login \
--overwrite
10 changes: 10 additions & 0 deletions azure-pipelines.release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ variables:
- name: tags
value: production,externalfacing

# below are variables configurable at queue time, so they cannot appear in yml file
# - name: skipPublish # set it to true in order to skip publishing to NPM. Useful for deploying docsite only updates.
# value: false

schedules:
# minute 0, hour 7 in UTC (11pm in UTC-8), any day of month, any month, days 1-5 of week (M-F)
# https://docs.microsoft.com/en-us/azure/devops/pipelines/build/triggers?tabs=yaml&view=azure-devops#supported-cron-syntax
Expand Down Expand Up @@ -124,6 +128,7 @@ extends:
- script: |
yarn publish:beachball -n $(npmToken) --config scripts/beachball/src/release-v8.config.js --message 'release: applying package updates - react v8'
git reset --hard origin/master
condition: eq(variables.skipPublish, false)
env:
GITHUB_PAT: $(githubPAT)
displayName: Publish changes and bump versions
Expand Down Expand Up @@ -154,10 +159,15 @@ extends:
node ./packages/public-docsite-setup/scripts/generateHomepage ./homepage
displayName: 'Generate homepage.htm'
- template: .devops/templates/publish-website.yml@self
parameters:
version: 8

# Run this near the end because it's more likely to fail than the artifact upload tasks, and its
# failure doesn't need to block anything else
- script: |
node -r ./scripts/ts-node/src/register ./scripts/update-release-notes/src/index.ts --token=$(githubPAT) --apply --debug
condition: eq(variables.skipPublish, false)
displayName: 'Update github release notes'
- template: .devops/templates/cleanup.yml@self
Expand Down

0 comments on commit 62f0ffc

Please sign in to comment.