Skip to content

Commit a56dbc5

Browse files
authored
Added Analyzer release pipeline (#2221)
1 parent ab29ee8 commit a56dbc5

File tree

3 files changed

+156
-1
lines changed

3 files changed

+156
-1
lines changed
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
trigger: none
2+
pr: none
3+
4+
pool:
5+
name: '1ES-Hosted-DurableTaskFramework'
6+
demands:
7+
- ImageOverride -equals MMS2022TLS
8+
9+
steps:
10+
11+
# Configure all the .NET SDK versions we need
12+
- task: UseDotNet@2
13+
displayName: 'Use the .NET Core 2.1 SDK (required for build signing)'
14+
inputs:
15+
packageType: 'sdk'
16+
version: '2.1.x'
17+
18+
- task: UseDotNet@2
19+
displayName: 'Use the .NET Core 3.1 SDK'
20+
inputs:
21+
packageType: 'sdk'
22+
version: '3.1.x'
23+
24+
- task: UseDotNet@2
25+
displayName: 'Use the .NET 6 SDK'
26+
inputs:
27+
packageType: 'sdk'
28+
version: '6.0.x'
29+
30+
# Use NuGet
31+
- task: NuGetToolInstaller@1
32+
displayName: 'Use NuGet '
33+
34+
# dotnet restore
35+
- task: DotNetCoreCLI@2
36+
displayName: 'dotnet restore'
37+
inputs:
38+
command: restore
39+
projects: '**/**/*.csproj'
40+
feedsToUse: config
41+
nugetConfigPath: '.nuget/nuget.config'
42+
43+
# Build durable-analyzer
44+
- task: VSBuild@1
45+
displayName: 'Build Durable Analyzer'
46+
inputs:
47+
solution: '**/WebJobs.Extensions.DurableTask.Analyzers.sln'
48+
vsVersion: "16.0"
49+
configuration: Release
50+
51+
# Authenticode sign all the DLLs with the Microsoft certificate.
52+
- task: EsrpCodeSigning@1
53+
inputs:
54+
ConnectedServiceName: 'ESRP Service'
55+
FolderPath: 'src/WebJobs.Extensions.DurableTask.Analyzers/bin/Release'
56+
Pattern: '*DurableTask.Analyzers.dll'
57+
signConfigType: 'inlineSignParams'
58+
inlineOperation: |
59+
[
60+
{
61+
"KeyCode": "CP-230012",
62+
"OperationCode": "SigntoolSign",
63+
"Parameters": {
64+
"OpusName": "Microsoft",
65+
"OpusInfo": "http://www.microsoft.com",
66+
"FileDigest": "/fd \"SHA256\"",
67+
"PageHash": "/NPH",
68+
"TimeStamp": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
69+
},
70+
"ToolName": "sign",
71+
"ToolVersion": "1.0"
72+
},
73+
{
74+
"KeyCode": "CP-230012",
75+
"OperationCode": "SigntoolVerify",
76+
"Parameters": {},
77+
"ToolName": "sign",
78+
"ToolVersion": "1.0"
79+
}
80+
]
81+
SessionTimeout: '60'
82+
MaxConcurrency: '50'
83+
MaxRetryAttempts: '5'
84+
85+
# SBOM generator task for additional supply chain protection
86+
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
87+
displayName: 'Manifest Generator '
88+
inputs:
89+
BuildDropPath: '$(System.DefaultWorkingDirectory)'
90+
91+
# dotnet pack
92+
# Packaging needs to be a separate step from build.
93+
# This will automatically pick up the signed DLLs.
94+
- task: DotNetCoreCLI@2
95+
displayName: 'dotnet pack WebJobs.Extensions.DurableTask.Analyzers.csproj'
96+
inputs:
97+
command: pack
98+
packagesToPack: 'src/**/WebJobs.Extensions.DurableTask.Analyzers.csproj'
99+
configuration: Release
100+
packDirectory: 'azure-functions-durable-extension'
101+
nobuild: true
102+
103+
# Remove redundant symbol package(s)
104+
- script: |
105+
echo *** Searching for .symbols.nupkg files to delete...
106+
dir /s /b *.symbols.nupkg
107+
108+
echo *** Deleting .symbols.nupkg files...
109+
del /S /Q *.symbols.nupkg
110+
111+
echo *** Listing remaining packages
112+
dir /s /b *.nupkg
113+
displayName: 'Remove Redundant Symbols Package(s)'
114+
continueOnError: true
115+
116+
# Digitally sign all the nuget packages with the Microsoft certificate.
117+
# This appears to be an in-place signing job, which is convenient.
118+
- task: EsrpCodeSigning@1
119+
inputs:
120+
ConnectedServiceName: 'ESRP Service'
121+
FolderPath: '$(System.DefaultWorkingDirectory)'
122+
Pattern: '*.nupkg'
123+
signConfigType: 'inlineSignParams'
124+
inlineOperation: |
125+
[
126+
{
127+
"KeyCode": "CP-401405",
128+
"OperationCode": "NuGetSign",
129+
"Parameters": {},
130+
"ToolName": "sign",
131+
"ToolVersion": "1.0"
132+
},
133+
{
134+
"KeyCode": "CP-401405",
135+
"OperationCode": "NuGetVerify",
136+
"Parameters": {},
137+
"ToolName": "sign",
138+
"ToolVersion": "1.0"
139+
}
140+
]
141+
SessionTimeout: '60'
142+
MaxConcurrency: '50'
143+
MaxRetryAttempts: '5'
144+
145+
# Make the nuget packages available for download in the ADO portal UI
146+
- publish: '$(System.DefaultWorkingDirectory)/azure-functions-durable-extension'
147+
displayName: 'Publish nuget packages to Artifacts'
148+
artifact: PackageOutput

src/WebJobs.Extensions.DurableTask.Analyzers.Vsix/WebJobs.Extensions.DurableTask.Analyzers.Vsix.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<AppDesignerFolder>Properties</AppDesignerFolder>
2222
<RootNamespace>DurableFunctionsAnalyzer.Vsix</RootNamespace>
2323
<AssemblyName>DurableFunctionsAnalyzer</AssemblyName>
24-
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
24+
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
2525
<GeneratePkgDefFile>false</GeneratePkgDefFile>
2626
<IncludeAssemblyInVSIXContainer>false</IncludeAssemblyInVSIXContainer>
2727
<IncludeDebugSymbolsInVSIXContainer>false</IncludeDebugSymbolsInVSIXContainer>

src/WebJobs.Extensions.DurableTask.Analyzers/WebJobs.Extensions.DurableTask.Analyzers.csproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,11 @@
4343
<None Include="$(OutputPath)\$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
4444
</ItemGroup>
4545

46+
<ItemGroup Condition="'$(Configuration)'=='Release'">
47+
<Content Include="..\..\_manifest\**">
48+
<Pack>true</Pack>
49+
<PackagePath>content/SBOM</PackagePath>
50+
</Content>
51+
</ItemGroup>
52+
4653
</Project>

0 commit comments

Comments
 (0)