-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set up build signing pipeline with Azure Pipelines (#606)
Also: * Created solution just for building DurableTask.AzureStorage and DurableTask.Core * Removed legacy static analysis, which was only working for net461 anyways * Updated some test projects from .net core 2.1 (out of support) to .net core 3.1
- Loading branch information
Showing
5 changed files
with
164 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
trigger: none | ||
pr: none | ||
|
||
pool: | ||
vmImage: 'windows-latest' | ||
|
||
steps: | ||
# Start by restoring all the dependencies. This needs to be its own task | ||
# from what I can tell. We specifically only target DurableTask.AzureStorage | ||
# and its direct dependencies. | ||
- task: DotNetCoreCLI@2 | ||
displayName: 'Restore nuget dependencies' | ||
inputs: | ||
command: restore | ||
verbosityRestore: Minimal | ||
projects: 'src/DurableTask.AzureStorage/DurableTask.AzureStorage.sln' | ||
|
||
# Build the filtered solution in release mode, specifying the continuous integration flag. | ||
- task: VSBuild@1 | ||
displayName: 'Build' | ||
inputs: | ||
solution: 'src/DurableTask.AzureStorage/DurableTask.AzureStorage.sln' | ||
vsVersion: '16.0' | ||
logFileVerbosity: minimal | ||
configuration: Release | ||
msbuildArgs: /p:GITHUB_RUN_NUMBER=$(Build.BuildId) /p:ContinuousIntegrationBuild=true | ||
|
||
# Authenticode sign all the DLLs with the Microsoft certificate. | ||
# This appears to be an in-place signing job, which is convenient. | ||
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1 | ||
displayName: 'ESRP CodeSigning: Authenticode' | ||
inputs: | ||
ConnectedServiceName: 'ESRP Service' | ||
FolderPath: 'src' | ||
Pattern: 'DurableTask.*.dll' | ||
signConfigType: inlineSignParams | ||
inlineOperation: | | ||
[ | ||
{ | ||
"KeyCode": "CP-230012", | ||
"OperationCode": "SigntoolSign", | ||
"Parameters": { | ||
"OpusName": "Microsoft", | ||
"OpusInfo": "http://www.microsoft.com", | ||
"FileDigest": "/fd \"SHA256\"", | ||
"PageHash": "/NPH", | ||
"TimeStamp": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256" | ||
}, | ||
"ToolName": "sign", | ||
"ToolVersion": "1.0" | ||
}, | ||
{ | ||
"KeyCode": "CP-230012", | ||
"OperationCode": "SigntoolVerify", | ||
"Parameters": {}, | ||
"ToolName": "sign", | ||
"ToolVersion": "1.0" | ||
} | ||
] | ||
# Packaging needs to be a separate step from build. | ||
# This will automatically pick up the signed DLLs. | ||
- task: DotNetCoreCLI@2 | ||
displayName: Generate nuget packages | ||
inputs: | ||
command: pack | ||
verbosityPack: Minimal | ||
configuration: Release | ||
nobuild: true | ||
packDirectory: $(build.artifactStagingDirectory) | ||
packagesToPack: 'src/DurableTask.AzureStorage/DurableTask.AzureStorage.sln' | ||
|
||
# Digitally sign all the nuget packages with the Microsoft certificate. | ||
# This appears to be an in-place signing job, which is convenient. | ||
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1 | ||
displayName: 'ESRP CodeSigning: Nupkg' | ||
inputs: | ||
ConnectedServiceName: 'ESRP Service' | ||
FolderPath: $(build.artifactStagingDirectory) | ||
Pattern: '*.nupkg' | ||
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" | ||
} | ||
] | ||
# Make the nuget packages available for download in the ADO portal UI | ||
- publish: $(build.artifactStagingDirectory) | ||
displayName: 'Publish nuget packages to Artifacts' | ||
artifact: PackageOutput |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.0.31702.391 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{501E1168-418C-4832-B88C-617735BD02C9}" | ||
ProjectSection(SolutionItems) = preProject | ||
..\..\.nuget\NuGet.Config = ..\..\.nuget\NuGet.Config | ||
EndProjectSection | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{DBCD161C-D409-48E5-924E-9B7FA1C36B84}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{C0904C83-9993-49FA-A49C-C019AEB86C68}" | ||
ProjectSection(SolutionItems) = preProject | ||
..\..\tools\DurableTask.props = ..\..\tools\DurableTask.props | ||
EndProjectSection | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DurableTask.Core", "..\DurableTask.Core\DurableTask.Core.csproj", "{C8634F14-BE3B-4685-B0E1-C5726F8F3758}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DurableTask.AzureStorage", "DurableTask.AzureStorage.csproj", "{F1B270EA-9DC2-4753-B3DE-B45D3C128FDB}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Debug|x64 = Debug|x64 | ||
Release|Any CPU = Release|Any CPU | ||
Release|x64 = Release|x64 | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{C8634F14-BE3B-4685-B0E1-C5726F8F3758}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{C8634F14-BE3B-4685-B0E1-C5726F8F3758}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{C8634F14-BE3B-4685-B0E1-C5726F8F3758}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
{C8634F14-BE3B-4685-B0E1-C5726F8F3758}.Debug|x64.Build.0 = Debug|Any CPU | ||
{C8634F14-BE3B-4685-B0E1-C5726F8F3758}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{C8634F14-BE3B-4685-B0E1-C5726F8F3758}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{C8634F14-BE3B-4685-B0E1-C5726F8F3758}.Release|x64.ActiveCfg = Release|Any CPU | ||
{C8634F14-BE3B-4685-B0E1-C5726F8F3758}.Release|x64.Build.0 = Release|Any CPU | ||
{F1B270EA-9DC2-4753-B3DE-B45D3C128FDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{F1B270EA-9DC2-4753-B3DE-B45D3C128FDB}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{F1B270EA-9DC2-4753-B3DE-B45D3C128FDB}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
{F1B270EA-9DC2-4753-B3DE-B45D3C128FDB}.Debug|x64.Build.0 = Debug|Any CPU | ||
{F1B270EA-9DC2-4753-B3DE-B45D3C128FDB}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{F1B270EA-9DC2-4753-B3DE-B45D3C128FDB}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{F1B270EA-9DC2-4753-B3DE-B45D3C128FDB}.Release|x64.ActiveCfg = Release|Any CPU | ||
{F1B270EA-9DC2-4753-B3DE-B45D3C128FDB}.Release|x64.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(NestedProjects) = preSolution | ||
{C8634F14-BE3B-4685-B0E1-C5726F8F3758} = {DBCD161C-D409-48E5-924E-9B7FA1C36B84} | ||
{F1B270EA-9DC2-4753-B3DE-B45D3C128FDB} = {DBCD161C-D409-48E5-924E-9B7FA1C36B84} | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
EnterpriseLibraryConfigurationToolBinariesPath = packages\TransientFaultHandling.Core.5.1.1209.1\lib\NET4 | ||
SolutionGuid = {2D63A120-9394-48D9-8CA9-1184364FB854} | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters