forked from microsoft/fluentui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
157 lines (127 loc) · 4.33 KB
/
azure-pipelines.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
154
155
156
157
pr:
- master
# There's a separate pipeline for CI which also uses this file, but with a trigger override in the UI
# https://dev.azure.com/uifabric/fabricpublic/_apps/hub/ms.vss-ciworkflow.build-ci-hub?_a=edit-build-definition&id=164&view=Tab_Triggers
trigger: none
variables:
- ${{ if not(startsWith(variables['Build.SourceBranch'], 'refs/heads/')) }}:
- name: sinceArg
value: --since $(targetBranch)
- group: fabric-variables
- template: .devops/templates/variables.yml
pool: 'Self Host Ubuntu'
jobs:
- job: BuildTestLint
workspace:
clean: all
steps:
- template: .devops/templates/tools.yml
- task: Bash@3
inputs:
filePath: yarn-ci.sh
displayName: yarn
- script: |
yarn checkchange
displayName: check change
## Manually call prelint since lage calls lint per package, not per repo
- script: |
yarn prelint
displayName: prelint (satisfied, syncpack, lint-files)
- script: |
if [[ -n "$(targetBranch)" ]]; then
yarn format --since $(targetBranch) --check
else
yarn format --all --check
fi
displayName: check formatting
## Danger.js checks for Fluent UI N*
- script: |
yarn danger ci
displayName: danger
condition: variables.isPR
env:
DANGER_GITHUB_API_TOKEN: $(DANGER_GITHUB_API_TOKEN)
- script: |
yarn buildci --no-cache $(sinceArg)
displayName: build, test, lint
- template: .devops/templates/cleanup.yml
- job: Deploy
workspace:
clean: all
steps:
- template: .devops/templates/tools.yml
- task: Bash@3
inputs:
filePath: yarn-ci.sh
displayName: yarn
# this also builds FUI N* docs if appropriate
- script: |
yarn bundle --no-cache $(sinceArg)
displayName: bundle
## This runs regardless of scope, the app will adapt to the scope as well
- script: |
yarn workspace @fluentui/pr-deploy-site generate:site
displayName: generate PR Deploy Site
- task: AzureUpload@2
displayName: Upload PR deploy site
inputs:
azureSubscription: $(azureSubscription)
BlobPrefix: $(deployBasePath)
ContainerName: '$web'
SourcePath: 'apps/pr-deploy-site/dist'
storage: $(azureStorage)
- task: GithubPRStatus@0
displayName: 'Update PR deploy site github status'
inputs:
githubOwner: microsoft
githubRepo: fluentui
githubContext: 'Pull request demo site'
githubDescription: 'Click "Details" to go to the deployed demo site for this pull request'
# This MUST have a trailing slash, or the links to PR deploy site assets won't work
githubTargetLink: $(deployUrl)/
- template: .devops/templates/cleanup.yml
- job: ScreenerNorthstar
workspace:
clean: all
steps:
- template: .devops/templates/tools.yml
- task: Bash@3
inputs:
filePath: yarn-ci.sh
displayName: yarn
- script: |
yarn workspace @fluentui/docs vr:build
displayName: build FUI N* VR Test
env:
SCREENER_BUILD: 1
- task: AzureUpload@2
displayName: Upload N* VR test site
inputs:
azureSubscription: $(azureSubscription)
BlobPrefix: $(deployBasePath)/react-northstar-screener
CacheControl: 'public, max-age=600000'
ContainerName: '$web'
SourcePath: 'packages/fluentui/docs/dist'
storage: $(azureStorage)
- script: yarn workspace @fluentui/docs vr:test
displayName: start FUI N* VR Test
env:
SCREENER_ENDPOINT: $(screenerApiUri)
SCREENER_PROXY_ENDPOINT: $(screenerProxyUri)
SCREENER_API_KEY: $(screener.key)
- template: .devops/templates/cleanup.yml
- job: Screener
workspace:
clean: all
steps:
- template: .devops/templates/tools.yml
- task: Bash@3
inputs:
filePath: yarn-ci.sh
displayName: yarn
- script: |
yarn lage screener --to vr-tests --debug --verbose --no-cache
displayName: run VR Test
env:
SCREENER_API_KEY: $(screener.key)
- template: .devops/templates/cleanup.yml