Skip to content

Commit

Permalink
Don't fail the build if signing fails
Browse files Browse the repository at this point in the history
Output an error if signing fails, but don't fail the build. This is
needed to make it possible to run the builds from private test
environments without requiring the signing step to pass.

Signed-off-by: Henri Rosten <[email protected]>
  • Loading branch information
henrirosten authored and alextserepov committed Sep 4, 2024
1 parent cd64c33 commit 3282630
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions utils.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,16 @@ def find_img_relpath(String flakeref, String subdir, String abort_on_error="true

def sign_file(String path, String sigfile, String cert="INT-Ghaf-Devenv-Common") {
println "sign_file: ${path} ### ${cert} ### ${sigfile}"
sh(
// See the 'sign' command at: https://github.com/tiiuae/ci-yubi
script: """
mkdir -p \$(dirname '${sigfile}') || true
sign --path=${path} --cert=${cert} --sigfile=${sigfile}
try {
sh(
// See the 'sign' command at: https://github.com/tiiuae/ci-yubi
script: """
mkdir -p \$(dirname '${sigfile}') || true
sign --path=${path} --cert=${cert} --sigfile=${sigfile}
""", returnStdout: true).trim()
} catch (Exception e) {
println "Warning: signing failed: sigfile will not be generated for: ${path}"
}
}

def ghaf_hw_test(String flakeref, String device_config, String jenkins_url, String testset='_boot_') {
Expand Down

0 comments on commit 3282630

Please sign in to comment.