forked from microsoft/fluentui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.release.yml
153 lines (125 loc) · 4.68 KB
/
azure-pipelines.release.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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
pr: none
trigger: none
# Customize build number to include major version
# Example: v8_20201022.1
name: 'v8_$(Date:yyyyMMdd)$(Rev:.r)'
variables:
- group: 'Github and NPM secrets'
pool: 'Self Host Ubuntu'
schedules:
# minute 0, hour 12 in UTC (5am in UTC+7), 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 12 * * 1-5'
displayName: 'Daily release (M-F at 5am)' # will be 4am when DST ends unless trigger is updated
branches:
include:
- master
workspace:
clean: all
steps:
- template: .devops/templates/tools.yml
- script: |
git config user.name "Fluent UI Build"
git config user.email "[email protected]"
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: |
yarn generate-version-files
displayName: yarn generate-version-files
- script: |
yarn run:published build --production
displayName: yarn build (Create production build)
- script: |
yarn run:published test --production
displayName: yarn test
- script: |
yarn run:published lint
displayName: yarn lint
- script: |
yarn run:published bundle --production
displayName: yarn bundle
- script: |
echo Making $(Build.ArtifactStagingDirectory)/api &&
mkdir -p $(Build.ArtifactStagingDirectory)/api &&
cp packages/*/dist/*.api.json $(Build.ArtifactStagingDirectory)/api
displayName: Copy api.json files to artifact staging directory
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)/api
artifactName: 'api-json'
publishLocation: 'Container'
displayName: 'Publish Artifact: api.json'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: apps/public-docsite/dist
artifactName: 'fabric-website'
publishLocation: 'Container'
displayName: 'Publish Artifact: Fabric Website'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: apps/public-docsite/index.html
artifactName: 'fabric-website-index'
publishLocation: 'Container'
displayName: 'Publish Artifact: Fabric Website index.html'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: packages/react/dist
artifactName: 'fabric'
publishLocation: 'Container'
displayName: 'Publish Artifact: Fabric'
- script: |
npm run publish:beachball -- -b origin/master -n $(npmToken) --access public -y &&
git reset --hard origin/master
env:
GITHUB_PAT: $(githubPAT)
displayName: 'Publish Change Requests and Bump Versions'
- script: |
node -r ./scripts/ts-node-register ./scripts/updateReleaseNotes/index.ts --token=$(githubPAT) --apply --debug
displayName: 'Update github release notes'
- script: |
oufrVersion=$(node -p -e "require('./packages/react/package.json').version") &&
echo "OUFR Version: $oufrVersion" &&
echo $oufrVersion > oufr-version.txt &&
echo "##vso[task.setvariable variable=oufrVersion;]$oufrVersion"
displayName: 'Set OUFR Version Task Variable'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: ./oufr-version.txt
artifactName: 'oufr-version'
publishLocation: 'Container'
displayName: 'Publish Artifact: oufr-version.txt'
- script: |
npm run create-public-flight-config -- --baseCDNUrl https://fabricweb.azureedge.net/fabric-website/$(Build.BuildNumber)/
workingDirectory: apps/public-docsite
displayName: 'Generate Fabric Website Flight Manifest Files'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: apps/public-docsite/flights
artifactName: 'fabric-website-manifests'
publishLocation: 'Container'
displayName: 'Publish Artifact: Website manifests'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: apps/public-docsite-resources/dist/demo
artifactName: 'fabric-website-resources'
publishLocation: 'Container'
displayName: 'Publish Artifact: Fabric Website Resources'
- script: |
node ./scripts/generate-package-manifest
displayName: 'Generates a package manifest'
- task: AzureUpload@2
displayName: Upload Package Manifest
inputs:
SourcePath: 'package-manifest'
azureSubscription: 'UI Fabric (private)'
storage: fabricweb
ContainerName: 'fabric'
BlobPrefix: 'package-manifest'
Gzip: false
- template: .devops/templates/cleanup.yml
parameters:
checkForChangedFiles: false