Skip to content

Commit c9de799

Browse files
authored
Fix SBOM inclusion in Client & Worker packages (#128)
1 parent 0ffdc48 commit c9de799

File tree

4 files changed

+33
-18
lines changed

4 files changed

+33
-18
lines changed

.github/workflows/validate-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
run: dotnet restore $solution
3434

3535
- name: Build
36-
run: dotnet build $solution --configuration $config --no-restore -p:FileVersionRevision=$GITHUB_RUN_NUMBER
36+
run: dotnet build $solution --configuration $config --no-restore -p:FileVersionRevision=$GITHUB_RUN_NUMBER -p:ContinuousIntegrationBuild=true
3737

3838
- name: Test
3939
run: dotnet test $solution --configuration $config --no-build --verbosity normal

azure-pipelines-release.yml

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,21 @@ pool:
77
demands:
88
- ImageOverride -equals MMS2022TLS
99

10+
parameters:
11+
- name: binlog
12+
displayName: MSBuild binary log
13+
type: boolean
14+
default: false
15+
1016
variables:
1117
project: 'src/dirs.proj'
18+
bin_dir: 'out/bin'
19+
log_dir: 'out/log'
20+
pkg_dir: 'out/pkg'
21+
build_args: -c release -p:FileVersionRevision=$(Build.BuildId) -p:ContinuousIntegrationBuild=true
22+
${{ if parameters.binlog }}:
23+
build_binlog: -bl:$(log_dir)/build.binlog
24+
pack_binlog: -bl:$(log_dir)/pack.binlog
1225

1326
steps:
1427
- checkout: self
@@ -22,18 +35,18 @@ steps:
2235

2336
# Start by restoring all the dependencies. This needs to be its own task.
2437
- task: DotNetCoreCLI@2
25-
displayName: 'Restore'
38+
displayName: Restore
2639
inputs:
2740
command: restore
2841
verbosityRestore: Minimal
2942
projects: $(project)
3043

3144
# Build source directory
3245
- task: DotNetCoreCLI@2
33-
displayName: 'Build'
46+
displayName: Build
3447
inputs:
3548
command: build
36-
arguments: --no-restore -c release -p:FileVersionRevision=$(Build.BuildId) -p:ContinuousIntegrationBuild=true
49+
arguments: --no-restore $(build_args) $(build_binlog)
3750
projects: $(project)
3851

3952
# Authenticode sign all the DLLs with the Microsoft certificate.
@@ -42,7 +55,7 @@ steps:
4255
displayName: 'ESRP CodeSigning: Authenticode'
4356
inputs:
4457
ConnectedServiceName: 'ESRP Service'
45-
FolderPath: 'out/bin'
58+
FolderPath: $(bin_dir)
4659
Pattern: 'Microsoft.DurableTask.*.dll'
4760
signConfigType: inlineSignParams
4861
inlineOperation: |
@@ -78,22 +91,20 @@ steps:
7891
# Packaging needs to be a separate step from build.
7992
# This will automatically pick up the signed DLLs.
8093
- task: DotNetCoreCLI@2
81-
displayName: Generate nuget packages
94+
displayName: Pack
8295
inputs:
83-
command: pack
84-
verbosityPack: Minimal
85-
configuration: release
86-
nobuild: true
87-
packDirectory: $(build.artifactStagingDirectory)
88-
packagesToPack: $(project)
96+
command: custom
97+
custom: pack
98+
arguments: --no-build $(build_args) $(pack_binlog)
99+
projects: $(project)
89100

90101
# Digitally sign all the nuget packages with the Microsoft certificate.
91102
# This appears to be an in-place signing job, which is convenient.
92103
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@2
93104
displayName: 'ESRP CodeSigning: Nupkg'
94105
inputs:
95106
ConnectedServiceName: 'ESRP Service'
96-
FolderPath: $(build.artifactStagingDirectory)
107+
FolderPath: $(pkg_dir)
97108
Pattern: '*.nupkg'
98109
signConfigType: inlineSignParams
99110
inlineOperation: |
@@ -115,6 +126,10 @@ steps:
115126
]
116127
117128
# Make the nuget packages available for download in the ADO portal UI
118-
- publish: $(build.artifactStagingDirectory)
119-
displayName: 'Publish nuget packages to Artifacts'
120-
artifact: PackageOutput
129+
- publish: $(pkg_dir)
130+
displayName: 'Publish packages to Artifacts'
131+
artifact: pkg
132+
133+
- publish: $(log_dir)
134+
displayName: 'Publish logs to Artifacts'
135+
artifact: log

eng/targets/Release.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
<!-- Embed the SBOM manifest, which is generated as part of the "official" build -->
1616
<ItemGroup Condition="'$(Configuration)'=='Release'">
17-
<Content Include="..\..\_manifest\**" Pack="true" PackagePath="content/SBOM">
17+
<Content Include="$(RepoRoot)_manifest/**" Pack="true" PackagePath="content/SBOM">
1818
<Pack>true</Pack>
1919
<PackagePath>content/SBOM</PackagePath>
2020
</Content>

src/Directory.Build.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</PropertyGroup>
1515

1616
<ItemGroup>
17-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.*" PrivateAssets="All" />
17+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
1818
</ItemGroup>
1919

2020
<ItemGroup Condition="'$(EnableStyleCop)' == 'true'">

0 commit comments

Comments
 (0)