forked from microsoft/react-native-winrt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
137 lines (121 loc) · 4.48 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
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- main
- release/*
pool:
vmImage: 'windows-2019'
# NOTE: The major/minor versions correspond to the React Native version we target/have tested against
variables:
product_major_version: 0
product_minor_version: 72
product_build: $[format('{0:yyyyMMdd}', pipeline.startTime)]
product_build_qfe: $[counter(format('{0}.{1}.{2}', variables['product_major_version'], variables['product_minor_version'], variables['product_build']), 1)]
# NOTE: The first two digits are the targeted React Native version
name: $(product_major_version).$(product_minor_version).$(product_build).$(product_build_qfe)
jobs:
- job: Build
steps:
- task: NuGetToolInstaller@1
- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2
inputs:
command: 'restore'
restoreSolution: 'rnwinrt\rnwinrt.sln'
feedsToUse: 'config'
nugetConfigPath: ''
- task: VSBuild@1
displayName: 'Build solution rnwinrt.sln'
inputs:
solution: rnwinrt\rnwinrt.sln
vsVersion: 'latest'
platform: 'x64'
configuration: 'Release'
msbuildArgs: '-p:RnWinRTMajorVersion=$(product_major_version);RnWinRTMinorVersion=$(product_minor_version);RnWinRTBuild=$(product_build);RnWinRTBuildQFE=$(product_build_qfe)'
- task: EsrpCodeSigning@2
displayName: 'ESRP CodeSigning'
inputs:
ConnectedServiceName: 'Xlang Code Signing'
FolderPath: '$(Build.SourcesDirectory)\rnwinrt\x64\Release'
Pattern: 'rnwinrt.exe'
UseMinimatch: true
signConfigType: 'inlineSignParams'
SessionTimeout: '60'
MaxConcurrency: '50'
MaxRetryAttempts: '5'
- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2
inputs:
command: 'pack'
packagesToPack: 'rnwinrt/nuget/Microsoft.ReactNative.WinRT.nuspec'
configuration: 'Release'
packDestination: '$(Build.ArtifactStagingDirectory)'
versioningScheme: 'off'
buildProperties: 'rnwinrt_nuget_version=$(Build.BuildNumber);rnwinrt_exe=$(Build.SourcesDirectory)\rnwinrt\x64\Release\rnwinrt.exe;reactnative_files=$(Build.SourcesDirectory)\rnwinrt\module'
- task: EsrpCodeSigning@2
displayName: 'ESRP CodeSigning'
inputs:
ConnectedServiceName: 'Xlang Code Signing'
FolderPath: '$(Build.ArtifactStagingDirectory)'
Pattern: '*.nupkg'
UseMinimatch: true
signConfigType: 'inlineSignParams'
inlineOperation: |
[
{
"KeyCode" : "CP-401405",
"OperationCode" : "NuGetSign",
"Parameters" : {},
"ToolName" : "sign",
"ToolVersion" : "1.0"
},
{
"KeyCode" : "CP-401405",
"OperationCode" : "NuGetVerify",
"Parameters" : {},
"ToolName" : "sign",
"ToolVersion" : "1.0"
}
]
SessionTimeout: '60'
MaxConcurrency: '50'
MaxRetryAttempts: '5'
- task: PublishBuildArtifacts@1
displayName: 'Publish artifact: drop'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: 'drop'
- template: tests/e2e-test.yml
parameters:
jobName: E2ETest
buildEnvironment: PullRequest
dependsOn: Build
- template: tests/e2e-test.yml
parameters:
jobName: E2ETestHermes
buildEnvironment: PullRequest
dependsOn: Build
useHermes: true
- job: Publish
dependsOn:
- E2ETest
- E2ETestHermes
condition: |
or
(
eq(variables['Build.SourceBranch'], 'refs/heads/main'),
startsWith(variables['Build.SourceBranch'], 'refs/heads/release/')
)
steps:
- task: DownloadBuildArtifacts@0
inputs:
artifactName: drop
downloadPath: '$(Build.SourcesDirectory)\Artifacts'
condition: succeeded()
- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2
inputs:
command: 'push'
packagesToPush: '$(Build.SourcesDirectory)/Artifacts/drop/*.nupkg;!$(Build.SourcesDirectory)/Artifacts/drop/*.symbols.nupkg'
nuGetFeedType: 'internal'
publishVstsFeed: 'JsWinRT'
condition: succeeded()