forked from microsoft/fluentui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.release-vnext-nightly.yml
104 lines (90 loc) · 3.71 KB
/
azure-pipelines.release-vnext-nightly.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
pr: none
trigger: none
# Customize build number to include major version
# Example: v9_20201022.1
name: 'v9_nightly_$(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
schedules:
# Triggers the nightly release
# minute 0, hour 4 in UTC (5am in UTC+1), 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
- cron: '0 4 * * 1-5'
displayName: 'Daily release (M-F at 5am UTC+1)'
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 "[email protected]"
displayName: Configure git user (used by beachball)
- task: Bash@3
inputs:
filePath: yarn-ci.sh
displayName: yarn
# Deletes all existing changefiles so that only bump that happens is for nightly
- script: |
rm -f change/*
displayName: 'Delete existing changefiles'
# Bumps all v9 packages to a x.x.x-nightly.commitSha version and checks in change files
- script: |
date=$(date +"%Y%m%d-%H%M")
#release version name will follow a 0.0.0-nightly-{year}{month}{day}-{hour}{minute} format.
yarn nx g @fluentui/workspace-plugin:version-bump --all --bumpType nightly --prereleaseTag "nightly-${date}"
git add .
git commit -m "bump nightly versions"
yarn change --type prerelease --message "Release nightly v9" --dependent-change-type "prerelease"
displayName: 'Bump and commit nightly versions'
- script: |
yarn nx run react-components:build --nxBail
displayName: build
- script: |
yarn nx run react-components:lint --nxBail
displayName: lint
- script: |
yarn nx run react-components:test --nxBail
displayName: test
- script: |
yarn publish:beachball -n $(npmToken) --no-push --tag nightly --config scripts/beachball/src/release-vNext.config.js
git reset --hard origin/master
displayName: Publish changes and bump versions
- template: .devops/templates/cleanup.yml@self
parameters:
checkForModifiedFiles: false