forked from microsoft/fluentui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
147 lines (120 loc) · 4.63 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
pr:
- master
- website-content
trigger:
- master
variables:
- group: fabric-variables
pool: 'fluentbuild'
jobs:
- job: BuildTestLint
workspace:
clean: all
steps:
- template: azure-pipelines.tools.yml
- script: |
yarn
displayName: yarn
- template: .devops/templates/pr-target-branch.yml
- script: |
yarn checkchange
displayName: check change
## manually call this since lage is now used and it calls lint per package, not per repo
- script: |
yarn prelint
displayName: do syncpack and no-tslint checks
## only do scoped builds with PRs
- script: |
yarn lage build test lint --verbose --no-cache --grouped --since $(target_branch)
displayName: build, test, lint (pr, scoped)
condition: ne(variables['Build.SourceBranch'], 'refs/heads/master')
env:
BACKFILL_CACHE_PROVIDER: 'azure-blob'
BACKFILL_CACHE_PROVIDER_OPTIONS: '{"connectionString":"$(BACKFILL_CONNECTION_STRING)", "container":"$(BACKFILL_CONTAINER)"}'
## duplicated build step, but without --since flag for master CI builds
- script: |
yarn lage build test lint --verbose --no-cache --grouped
displayName: build, test, lint (master)
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
env:
BACKFILL_CACHE_PROVIDER: 'azure-blob'
BACKFILL_CACHE_PROVIDER_OPTIONS: '{"connectionString":"$(BACKFILL_CONNECTION_STRING)", "container":"$(BACKFILL_CONTAINER)"}'
- job: Deploy
workspace:
clean: all
variables:
PR_DEPLOY: 1
steps:
- template: azure-pipelines.tools.yml
- script: |
yarn
displayName: yarn
- template: .devops/templates/pr-target-branch.yml
## only do scoped bundle with PRs
- script: |
yarn lage bundle --verbose --no-cache --grouped --since $(target_branch)
displayName: bundle (pr, scoped)
condition: ne(variables['Build.SourceBranch'], 'refs/heads/master')
env:
BACKFILL_CACHE_PROVIDER: 'azure-blob'
BACKFILL_CACHE_PROVIDER_OPTIONS: '{"connectionString":"$(BACKFILL_CONNECTION_STRING)", "container":"$(BACKFILL_CONTAINER)"}'
## duplicated for master CI builds
- script: |
yarn lage bundle --verbose --no-cache --grouped
displayName: bundle (master)
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
env:
BACKFILL_CACHE_PROVIDER: 'azure-blob'
BACKFILL_CACHE_PROVIDER_OPTIONS: '{"connectionString":"$(BACKFILL_CONNECTION_STRING)", "container":"$(BACKFILL_CONTAINER)"}'
## This runs regardless of scope, the app will adapt to the scope as well
- script: |
yarn workspace @uifabric/pr-deploy-site generate:site
displayName: generate PR Deploy Site
- publish: $(Build.ArtifactStagingDirectory)
artifact: Build-PR-$(Build.BuildNumber)
- task: AzureUpload@1
displayName: Upload PR deploy site
inputs:
SourcePath: 'apps/pr-deploy-site/dist'
azureSubscription: 'UI Fabric (bac044cf-49e1-4843-8dda-1ce9662606c8)'
storage: fabricweb
ContainerName: '$web'
BlobPrefix: 'pr-deploy-site/$(Build.SourceBranch)'
- job: ScreenerFluent
steps:
- template: azure-pipelines.tools.yml
- script: |
yarn
displayName: yarn
- script: |
git config --global user.email "fabrictactical@microsoft.com"
git config --global user.name "Fabric Tactical"
yarn test:fluentui:visual
displayName: run FUI VR Test
env:
SCREENER_API_KEY: $(screener.key)
- task: DeleteFiles@1
inputs:
SourceFolder: $(Build.SourcesDirectory)
Contents: '**/*'
condition: always()
- job: Screener
workspace:
clean: all
steps:
- template: azure-pipelines.tools.yml
- script: |
yarn
displayName: yarn
- template: .devops/templates/pr-target-branch.yml
- script: |
git config --global user.email "fabrictactical@microsoft.com"
git config --global user.name "Fabric Tactical"
displayName: config git user and email
- script: |
yarn lage screener --scope vr-tests --debug --verbose --no-deps --no-cache --grouped
displayName: run VR Test
env:
SCREENER_API_KEY: $(screener.key)
BACKFILL_CACHE_PROVIDER: 'azure-blob'
BACKFILL_CACHE_PROVIDER_OPTIONS: '{"connectionString":"$(BACKFILL_CONNECTION_STRING)", "container":"$(BACKFILL_CONTAINER)"}'