fluentui/azure-pipelines.release-vne...

112 строки
4.3 KiB
YAML

pr: none
trigger: none
# Customize build number to include major version
# Example: v9_20201022.1
name: 'v9_$(Date:yyyyMMdd)$(Rev:.r)'
variables:
- group: 'Github and NPM secrets'
- template: .devops/templates/variables.yml
parameters:
skipComponentGovernanceDetection: false
- name: release.vnext # Used to scope beachball to release only vnext packages
value: true
- name: tags
value: production,externalfacing
# TODO set schedule once the pipeline is validated after a few manual releases
# schedules:
# # minute 0, hour 7 in UTC (11pm in UTC-8), Every monday
# # https://docs.microsoft.com/en-us/azure/devops/pipelines/build/triggers?tabs=yaml&view=azure-devops#supported-cron-syntax
# - cron: '0 7 * * 1'
# # will be 12am during daylight savings time unless trigger is updated
# displayName: 'Scheduled release (Every monday)'
# branches:
# include:
# - master
resources:
repositories:
- repository: 1esPipelines
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
extends:
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
parameters:
pool:
name: Azure-Pipelines-1ESPT-ExDShared
image: windows-latest
os: windows # We need windows because compliance task only run on windows.
stages:
- stage: main
jobs:
- job: Release
pool:
name: '1ES-Host-Ubuntu'
image: '1ES-PT-Ubuntu-20.04'
os: linux
workspace:
clean: all
templateContext:
outputs:
- output: pipelineArtifact
targetPath: $(System.DefaultWorkingDirectory)
artifactName: output
steps:
- template: .devops/templates/tools.yml@self
- script: |
git config user.name "Fluent UI Build"
git config user.email "fluentui-internal@service.microsoft.com"
git remote set-url origin https://$(githubUser):$(githubPAT)@github.com/microsoft/fluentui.git
displayName: Authenticate git for pushes
- task: Bash@3
inputs:
filePath: yarn-ci.sh
displayName: yarn
- script: |
FLUENT_PROD_BUILD=true yarn nx run-many -t build -p tag:vNext --exclude 'tag:tools,tag:type:stories,apps/**' --nxBail
displayName: build
- script: |
FLUENT_PROD_BUILD=true yarn nx run-many -t test -p tag:vNext --exclude 'tag:tools,tag:type:stories,apps/**' --nxBail
displayName: test
- script: |
FLUENT_PROD_BUILD=true yarn nx run-many -t lint -p tag:vNext --exclude 'tag:tools,tag:type:stories,apps/**' --nxBail
displayName: lint
- script: |
yarn publish:beachball -n $(npmToken) --config scripts/beachball/src/release-vNext.config.js --message 'release: applying package updates - react-components'
git reset --hard origin/master
env:
GITHUB_PAT: $(githubPAT)
displayName: Publish changes and bump versions
- script: |
node -r ./scripts/ts-node/src/register scripts/executors/src/tag-react-components.ts --token $(npmToken)
displayName: Tag prelease packages with prerelease tag
continueOnError: true
# Since releases are scoped, this should warn for any packages that were mistakenly not included in scoping
- script: |
yarn syncpack list-mismatches
displayName: Check for dependency mismatches
# TODO update release notes script for v9
# - script: |
# node -r ./scripts/ts-node/src/register ./scripts/update-release-notes/src/index.ts --token=$(githubPAT) --apply --debug
# displayName: 'Update github release notes'
# This would usually be run automatically (via a pipeline decorator from an extension), but the
# thorough cleanup step prevents it from working. So run it manually here.
- template: .devops/templates/cleanup.yml@self
parameters:
checkForModifiedFiles: false