-
Notifications
You must be signed in to change notification settings - Fork 539
/
azure-pipelines-internal-release.yml
145 lines (145 loc) · 4.86 KB
/
azure-pipelines-internal-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
######################################
# NOTE: Before running this pipeline to generate a new nuget package, update the version string in two places
# 1) update the name: string below (line 6) -- this is the version for the nuget package (e.g. 1.9.52)
# 2) update \libs\host\GarnetServer.cs readonly string version (~line 45) -- NOTE - these two values need to be the same
######################################
name: 1.9.53
trigger: none
resources:
repositories:
- repository: self
type: git
ref: refs/heads/main
jobs:
- job: Phase_1
displayName: Assessment
cancelTimeoutInMinutes: 1
pool:
name: Azure Pipelines
steps:
- checkout: self
clean: False
submodules: recursive
persistCredentials: True
- task: UseDotNet@2
displayName: Use .NET Core sdk 6.0.x
inputs:
version: 6.0.x
- task: UseDotNet@2
displayName: Use .NET Core sdk 7.0.x
inputs:
version: 7.0.x
- task: UseDotNet@2
displayName: Use .NET Core sdk 8.0.x
inputs:
version: 8.0.x
- task: NuGetToolInstaller@1
displayName: Nuget Tool Installer
inputs:
versionspec: '*'
checkLatest: true
- task: NuGetAuthenticate@1
displayName: NuGet Authenticate
- task: NuGetAuthenticate@1
displayName: 'NuGet Authenticate'
- task: DotNetCoreCLI@2
displayName: dotnet build
inputs:
projects: '**/Garnet.*.csproj'
arguments: -c Release
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@2
displayName: Sign the binaries
enabled: True
inputs:
ConnectedServiceName: Garnet Code Signing
FolderPath: .
Pattern: Garnet.server.dll,Garnet.client.dll,Garnet.common.dll,Garnet.cluster.dll,Garnet.host.dll,HdrHistogram.dll,Tsavorite.core.dll,Tsavorite.devices.AzureStorageDevice.dll,native_device.dll
signConfigType: inlineSignParams
inlineOperation: >-
[
{
"keyCode": "CP-230012",
"operationSetCode": "SigntoolSign",
"parameters": [
{
"parameterName": "OpusName",
"parameterValue": "Microsoft"
},
{
"parameterName": "OpusInfo",
"parameterValue": "http://www.microsoft.com"
},
{
"parameterName": "FileDigest",
"parameterValue": "/fd \"SHA256\""
},
{
"parameterName": "PageHash",
"parameterValue": "/NPH"
},
{
"parameterName": "TimeStamp",
"parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
}
],
"toolName": "sign",
"toolVersion": "1.0"
},
{
"keyCode": "CP-230012",
"operationSetCode": "SigntoolVerify",
"parameters": [ ],
"toolName": "sign",
"toolVersion": "1.0"
}
]
- task: CmdLine@2
displayName: Command Line Script
inputs:
script: dir
- task: CopyFiles@2
displayName: 'Copy Files to: $(build.artifactstagingdirectory)'
inputs:
Contents: '**/bin/AnyCPU/$(BuildConfiguration)/**/*'
TargetFolder: $(build.artifactstagingdirectory)
- task: NuGetCommand@2
displayName: nuget pack Garnet
enabled: True
inputs:
command: custom
arguments: pack Garnet.nuspec -OutputDirectory $(Build.ArtifactStagingDirectory) -Properties Configuration=$(BuildConfiguration) -Symbols -SymbolPackageFormat snupkg -version $(Build.BuildNumber) -Verbosity Detailed
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@2
displayName: Sign the NuGet Package
enabled: True
inputs:
ConnectedServiceName: Garnet Code Signing
FolderPath: $(Build.ArtifactStagingDirectory)
Pattern: Microsoft.Garnet.*.nupkg
signConfigType: inlineSignParams
inlineOperation: >-
[
{
"keyCode": "CP-401405",
"operationSetCode": "NuGetSign",
"parameters": [ ],
"toolName": "sign",
"toolVersion": "1.0"
},
{
"keyCode": "CP-401405",
"operationSetCode": "NuGetVerify",
"parameters": [ ],
"toolName": "sign",
"toolVersion": "1.0"
}
]
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
enabled: True
- task: NuGetCommand@2
displayName: Internal NuGet push
enabled: True
inputs:
command: push
searchPatternPush: $(Build.ArtifactStagingDirectory)/**/*.nupkg
feedPublish: f1985af0-e833-489c-9266-0d9999734615/d2a662ea-a7a6-4cf7-ab9d-8b8dc36082cd