Skip to content
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
40 changes: 30 additions & 10 deletions EsrpSign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,36 @@ steps:
inputs:
version: 2.x

- template: template-compliance/authenticode-sign.yml
parameters:
buildOutputPath: ${{ parameters.buildOutputPath }}
signOutputPath: ${{ parameters.signOutputPath }}
pattern: ${{ parameters.pattern }}
certificateId: ${{ parameters.certificateId }}
condition: or(eq('${{ parameters.certificateId }}', 'CP-230012'), eq('${{ parameters.certificateId }}', 'CP-231522'))

- template: template-compliance/nuget-sign.yml
condition: eq('${{ parameters.certificateId }}', 'CP-401405')
- pwsh: |
Write-Verbose -Verbose "buildOutputPath = '${{ parameters.buildOutputPath }}'"
Write-Verbose -Verbose "signOutputPath = '${{ parameters.signOutputPath }}'"
Write-Verbose -Verbose "certificateId = '${{ parameters.certificateId }}'"
Write-Verbose -Verbose "pattern = '${{ parameters.pattern }}'"
displayName: Log parameters

- ${{ if eq(parameters.certificateId , 'CP-230012') }}:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This cert should also use authenticode 'CP-231522'

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

having them in a since if did not work for some reason.

- template: template-compliance/authenticode-sign.yml
parameters:
buildOutputPath: ${{ parameters.buildOutputPath }}
signOutputPath: ${{ parameters.signOutputPath }}
pattern: ${{ parameters.pattern }}
certificateId: ${{ parameters.certificateId }}

- ${{ if eq(parameters.certificateId , 'CP-231522') }}:
- template: template-compliance/authenticode-sign.yml
parameters:
buildOutputPath: ${{ parameters.buildOutputPath }}
signOutputPath: ${{ parameters.signOutputPath }}
pattern: ${{ parameters.pattern }}
certificateId: ${{ parameters.certificateId }}

- ${{ if eq(parameters.certificateId, 'CP-401405') }}:
- template: template-compliance/nuget-sign.yml
parameters:
buildOutputPath: ${{ parameters.buildOutputPath }}
signOutputPath: ${{ parameters.signOutputPath }}
pattern: ${{ parameters.pattern }}
certificateId: ${{ parameters.certificateId }}

- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
displayName: Sign files
Expand Down
6 changes: 0 additions & 6 deletions template-compliance/nuget-sign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ steps:
operationSetCode = "NuGetSign"
toolName = "sign"
toolVersion = "1.0"
},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could not get nuget verify to work, i will solve this later

@{
keyCode = $CertificateId
operationSetCode = "NuGetVerify"
toolName = "sign"
toolVersion = "1.0"
}
)

Expand Down