-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Jar Maven Signing - GnuPG and sha256 #22217
base: main
Are you sure you want to change the base?
Conversation
workingDirectory: '$(Build.BinariesDirectory)' | ||
script: | | ||
#!/bin/bash | ||
|
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.
Add
set -x
to the beginning of the script. Otherwise if any of the command failed we wouldn't know.
inputs: | ||
targetType: 'inline' | ||
workingDirectory: '$(Build.BinariesDirectory)' | ||
script: | |
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.
If you move the content to a separate *.ps1 file, we have a pipeline that can do grammar check and static analysis on the file.
foreach ($file in $targeting_original_files) { | ||
$file_path = Join-Path $jar_file_directory -ChildPath $file | ||
Write-Host "GnuPG signing to file: "$file_path | ||
& $gpg_exe_path --pinentry-mode loopback --passphrase-file $passphrase_file -ab $file_path |
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.
For all such external commands, you need to check their exit code. Like:
if ($lastExitCode -ne 0) {
Write-Host -Object "xxx command failed. Exitcode: $exitCode"
exit $lastExitCode
}
See https://github.com/microsoft/onnxruntime/blob/main/tools/ci_build/github/windows/helpers.ps1
Description
Jar maven signing:
Jar packages artifacts:
Motivation and Context
Previously, it is manually signed.
Goal: make it automatically.