Skip to content

Commit

Permalink
Use sign-files template (#2554)
Browse files Browse the repository at this point in the history
  • Loading branch information
jviau authored Jul 2, 2024
1 parent 18bfc6a commit 0152b65
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 138 deletions.
102 changes: 18 additions & 84 deletions eng/ci/templates/official/jobs/build-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,73 +33,25 @@ jobs:
projects: |
DotNetWorker.sln
- task: EsrpCodeSigning@2
displayName: Sign SDK assemblies
inputs:
ConnectedServiceName: ESRP Service-internal
FolderPath: sdk
Pattern: Microsoft.Azure.Functions.Worker.Sdk*.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"
}
]
- template: ci/sign-files.yml@eng
parameters:
displayName: Sign SDK assemblies
folderPath: sdk
pattern: Microsoft.Azure.Functions.Worker.Sdk*.dll
signType: dll

- task: DeleteFiles@1
displayName: Delete CodeSignSummary files
inputs:
sourceFolder: sdk
contents: '**/CodeSignSummary-*.md'

- task: EsrpCodeSigning@2
displayName: Sign DotNetWorker assemblies
inputs:
ConnectedServiceName: ESRP Service-internal
FolderPath: src
Pattern: Microsoft.Azure.Functions.Worker*.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"
}
]
- template: ci/sign-files.yml@eng
parameters:
displayName: Sign DotNetWorker assemblies
folderPath: sdk
pattern: Microsoft.Azure.Functions.Worker*.dll
signType: dll

- task: DeleteFiles@1
displayName: Delete CodeSignSummary files
Expand All @@ -125,30 +77,12 @@ jobs:
projects: |
src/**/DotNetWorker*.csproj
- task: EsrpCodeSigning@2
displayName: Sign nuget packages
inputs:
ConnectedServiceName: ESRP Service-internal
FolderPath: $(Build.ArtifactStagingDirectory)/NugetPackages
Pattern: Microsoft.Azure.Functions.Worker*.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"
}
]
- template: ci/sign-files.yml@eng
parameters:
displayName: Sign nuget packages
folderPath: $(Build.ArtifactStagingDirectory)/NugetPackages
pattern: Microsoft.Azure.Functions.Worker*.nupkg
signType: nuget

- task: DeleteFiles@1
displayName: Delete CodeSignSummary files
Expand Down
66 changes: 12 additions & 54 deletions eng/ci/templates/steps/build-extension-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,36 +13,12 @@ steps:
projects: |
extensions/${{ parameters.ExtensionProjectName }}/**/*.csproj
- task: EsrpCodeSigning@2
displayName: Sign assemblies
inputs:
ConnectedServiceName: ESRP Service-internal
FolderPath: extensions
Pattern: Microsoft.Azure.Functions.Worker.Extensions*.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"
}
]
- template: ci/sign-files.yml@eng
parameters:
displayName: Sign assemblies
folderPath: sdk
pattern: Microsoft.Azure.Functions.Worker.Extensions*.dll
signType: dll

- task: DeleteFiles@1
displayName: Delete CodeSignSummary files
Expand All @@ -59,30 +35,12 @@ steps:
projects: |
extensions/${{ parameters.ExtensionProjectName }}/**/*.csproj
- task: EsrpCodeSigning@2
displayName: Sign nuget packages
inputs:
ConnectedServiceName: ESRP Service-internal
FolderPath: $(Build.ArtifactStagingDirectory)/NugetPackages
Pattern: Microsoft.Azure.Functions.Worker.Extensions*.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"
}
]
- template: ci/sign-files.yml@eng
parameters:
displayName: Sign nuget packages
folderPath: $(Build.ArtifactStagingDirectory)/NugetPackages
pattern: Microsoft.Azure.Functions.Worker.Extensions*.nupkg
signType: nuget

- task: DeleteFiles@1
displayName: Delete CodeSignSummary files
Expand Down

0 comments on commit 0152b65

Please sign in to comment.