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

Code sign in CI builds #446

Merged
merged 1 commit into from Mar 9, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 18 additions & 0 deletions azure-pipelines.yml
Expand Up @@ -28,6 +28,8 @@ resources:
jobs:
- job: Windows
pool: Hosted Windows 2019 with VS2019
variables:
- group: dotnetfoundation code signing
steps:
- checkout: self
clean: true
Expand Down Expand Up @@ -118,6 +120,22 @@ jobs:
TargetFolder: $(Build.ArtifactStagingDirectory)/deployables
flattenFolders: true
displayName: Collecting deployable artifacts

- pwsh: >
dotnet tool install --tool-path obj SignClient

obj/SignClient sign
--baseDirectory '$(Build.ArtifactStagingDirectory)/deployables'
--input '**/*'
--config '$(System.DefaultWorkingDirectory)/azure-pipelines/SignClient.json'
--filelist '$(System.DefaultWorkingDirectory)/azure-pipelines/signfiles.txt'
--user '$(codesign_username)'
--secret '$(codesign_secret)'
--name 'Nerdbank.GitVersioning'
--descriptionUrl 'https://github.com/dotnet/Nerdbank.GitVersioning'
displayName: Code sign
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))

- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: $(Build.ArtifactStagingDirectory)/deployables
Expand Down
13 changes: 13 additions & 0 deletions azure-pipelines/SignClient.json
@@ -0,0 +1,13 @@
{
"SignClient": {
"AzureAd": {
"AADInstance": "https://login.microsoftonline.com/",
"ClientId": "c248d68a-ba6f-4aa9-8a68-71fe872063f8",
"TenantId": "16076fdc-fcc1-4a15-b1ca-32c9a255900e"
},
"Service": {
"Url": "https://codesign.dotnetfoundation.org/",
"ResourceId": "https://SignService/3c30251f-36f3-490b-a955-520addb85001"
}
}
}
4 changes: 4 additions & 0 deletions azure-pipelines/signfiles.txt
@@ -0,0 +1,4 @@
**/Cake.GitVersioning.dll
**/Nerdbank*.dll
**/nbgv.dll
**/*.ps1