-
Notifications
You must be signed in to change notification settings - Fork 16
Add Pgp signing template #15
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
Changes from all commits
ee3f14b
0ea78b7
a0c1f12
adfbb65
bf44fd0
233000b
efd8353
1634bfd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,5 +56,5 @@ steps: | |
$vstsCommandString = "vso[task.setvariable variable=GDN_CODESIGN_TARGETDIRECTORY]${{ parameters.signOutputPath }}" | ||
Write-Verbose -Message ("sending " + $vstsCommandString) -Verbose | ||
Write-Host "##$vstsCommandString" | ||
displayName: Generate signing JSON | ||
displayName: Generate Authenticode signing JSON | ||
condition: and(and(and(succeeded(), eq(variables['Build.Reason'], 'Manual')), ne(variables['SkipSigning'], 'True')), ne(variables['SigningServer'], '')) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this seems to be the same calculation as in EsrpSign. Is there someway to have only a single instance of this calculation be shared between files? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The best I can think of is to pass it in as parameter and it causes issues. I'll file a feature request for step templates to be conditional. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
parameters: | ||
- name: "signOutputPath" | ||
default: "$(Build.ArtifactStagingDirectory)\\signed" | ||
- name: "pattern" | ||
default: "*.rpm,*.deb" | ||
- name: "certificateId" | ||
default: "CP-450778-Pgp" | ||
|
||
steps: | ||
|
||
- pwsh: | | ||
[string] $CertificateId = "${{ parameters.certificateId }}" | ||
Write-Verbose "CertificateId - $CertificateId" -Verbose | ||
|
||
[string] $VariableName = "EsrpJson" | ||
|
||
[string] $SigningServer = '$(SigningServer)' | ||
Write-Verbose "SigningServer - $SigningServer" -Verbose | ||
|
||
$esrp = @(@{ | ||
keyCode = $CertificateId | ||
operationSetCode = "LinuxSign" | ||
toolName = "sign" | ||
toolVersion = "1.0" | ||
}) | ||
|
||
$vstsCommandString = "vso[task.setvariable variable=$VariableName][$($esrp | ConvertTo-Json -Compress)]" | ||
Write-Verbose -Message ("sending " + $vstsCommandString) -Verbose | ||
Write-Host "##$vstsCommandString" | ||
|
||
$vstsCommandString = "vso[task.setvariable variable=GDN_CODESIGN_TARGETDIRECTORY]${{ parameters.signOutputPath }}" | ||
Write-Verbose -Message ("sending " + $vstsCommandString) -Verbose | ||
Write-Host "##$vstsCommandString" | ||
displayName: Generate PGP signing JSON | ||
condition: and(and(and(succeeded(), eq(variables['Build.Reason'], 'Manual')), ne(variables['SkipSigning'], 'True')), ne(variables['SigningServer'], '')) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yep - and here is that calculation again There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. unfortunately, we tried doing the calculation one time and it causes issues |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the copy happen before the ESRP task so we can have unsigned files still in buildOutputPath?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a behavior change. I can work on this after I get this work done.
I think this makes sense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing, is we might end up with unsigned files in the signed folder.