forked from microsoft/fsharplu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCI-vsts.yml
128 lines (113 loc) · 4.53 KB
/
CI-vsts.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
## VSTS pipeline to build, test, package and sign the nuget package
queue:
demands: vstest
variables:
NUGET_PACKAGE_VERSION: 0.10.29
#Your build definition references the ‘NUGET_PACKAGE_VERSION’ variable, which you’ve selected to be settable at queue time. Create or edit the build definition for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
#Your build definition references the ‘BuildConfiguration’ variable, which you’ve selected to be settable at queue time. Create or edit the build definition for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
#Your build definition references the ‘BuildPlatform’ variable, which you’ve selected to be settable at queue time. Create or edit the build definition for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
steps:
- task: DotNetCoreInstaller@0
displayName: Use .NET Core sdk 2.1.200
inputs:
version: 2.1.200
- powershell: . scripts/Update-AssemblyVersion.ps1 -version $(NUGET_PACKAGE_VERSION)
displayName: Set assembly/nuget version number
- task: DotNetCoreCLI@2
displayName: dotnet build for testing
inputs:
arguments: '--no-incremental /t:rebuild /p:Configuration="$(BuildConfiguration)"'
- task: VSTest@2
displayName: Test Assemblies
inputs:
testAssemblyVer2: |
**\*test*.dll
!**\obj\**
vsTestVersion: '15.0'
runInParallel: false
codeCoverageEnabled: false
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
- task: DotNetCoreCLI@2
displayName: dotnet build with delaysigning
inputs:
arguments: '--no-incremental /t:rebuild /p:Configuration="$(BuildConfiguration)" /p:CompilationSymbols=DELAYSIGNING'
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
displayName: ESRP CodeSign .Net assemblies
inputs:
ConnectedServiceName: 'MSR Springfield Code Signing'
FolderPath: '$(System.DefaultWorkingDirectory)'
Pattern: 'microsoft.fsharplu.windows.dll,microsoft.fsharplu.dll,microsoft.fsharplu.json.dll'
signConfigType: inlineSignParams
inlineOperation: |
[
{
"keyCode": "CP-235845-SN",
"operationSetCode": "StrongNameSign",
"parameters": [ ],
"toolName": "sign",
"toolVersion": "1.0"
},
{
"keyCode": "CP-235845-SN",
"operationSetCode": "StrongNameVerify",
"parameters": [ ],
"toolName": "sign",
"toolVersion": "1.0"
}
]
- task: DotNetCoreCLI@2
displayName: dotnet pack nuget
inputs:
command: pack
searchPatternPack: '**/*.fsproj'
outputDir: '$(Build.ArtifactStagingDirectory)\nuget'
versioningScheme: byEnvVar
versionEnvVar: 'NUGET_PACKAGE_VERSION'
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
displayName: ESRP CodeSign Nuget Package
inputs:
ConnectedServiceName: 'MSR Springfield Code Signing'
FolderPath: '$(Build.ArtifactStagingDirectory)\nuget'
Pattern: '*.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: DotNetCoreCLI@2
displayName: dotnet push nuget
inputs:
command: push
searchPatternPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg'
feedPublish: '6b4e3a7d-b009-4842-b76e-fb9a587cdc50'
enabled: false
- task: PublishSymbols@2
displayName: Publish symbols
inputs:
SearchPattern: '**\bin\**\*.pdb'
SymbolServerType: TeamServices
SymbolsProduct: Microsoft.FSharpLu
SymbolsVersion: '$( NUGET_PACKAGE_VERSION)'
continueOnError: true
- task: CopyFiles@2
displayName: Binplace built assemblies
inputs:
Contents: '**\bin\**'
TargetFolder: '$(Build.ArtifactStagingDirectory)\build'
enabled: false
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'