Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KX-11391 - SignFile replaced with AzureSignTool #35

Merged
merged 6 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .azuredevops/pipelines/build-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ stages:
- Agent.Name -equals ${{ parameters.AgentName }}

variables:
- group: 14.0 Authenticode signature parameters
- group: Code Sign KV Auth

- name: Configuration
value: Release
Expand Down Expand Up @@ -67,6 +67,14 @@ stages:
packageType: sdk
useGlobalJson: true

- task: DotNetCoreCLI@2
displayName: Restore dotnet tools
inputs:
command: custom
custom: tool
arguments: restore
workingDirectory: $(System.DefaultWorkingDirectory)

- task: DotNetCoreCLI@2
displayName: Restore dependencies
inputs:
Expand All @@ -82,6 +90,8 @@ stages:
projects: ${{ variables.ProjectFilePath }}
configuration: ${{ variables.Configuration }}
arguments: --no-restore
env:
AuthenticodeClientSecret: $(AuthenticodeClientSecret)

- task: DotNetCoreCLI@2
displayName: Create NuGet package
Expand Down
12 changes: 12 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"azuresigntool": {
"version": "4.0.1",
"commands": [
"azuresigntool"
]
}
}
}
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
<CopyDebugSymbolFilesFromPackages>true</CopyDebugSymbolFilesFromPackages>
<NoWarn>$(NoWarn);1591;S3267</NoWarn>
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
<TimestampServerUrl>http://timestamp.digicert.com</TimestampServerUrl>
</PropertyGroup>

<PropertyGroup Condition=" $(Configuration) == 'Release' ">
Expand Down
6 changes: 3 additions & 3 deletions Directory.build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<AssemblyToSign Include="$(TargetPath)" />
<AssemblyToSign Include="$(XmlSerializersTargetPath)" Condition="Exists('$(XmlSerializersTargetPath)')" />
</ItemGroup>

<!--<SignFile CertificateThumbprint="$(AuthenticodeCertificateThumbprint)" TimestampUrl="http://time.certum.pl" SigningTarget="%(AssemblyToSign.Identity)" />-->
<Exec Command="dotnet AzureSignTool sign --azure-key-vault-url $(AuthenticodeKeyVaultUrl) --azure-key-vault-tenant-id $(AuthenticodeTenantId) --azure-key-vault-client-id $(AuthenticodeClientId) --azure-key-vault-client-secret $(AuthenticodeClientSecret) --azure-key-vault-certificate $(AuthenticodeCertificateName) --timestamp-rfc3161 $(TimestampServerUrl) --skip-signed %(AssemblyToSign.Identity)" />
</Target>
</Project>
</Project>
Loading