summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Wittenburg <scott.wittenburg@kitware.com>2023-08-12 09:52:46 -0600
committerGitHub <noreply@github.com>2023-08-12 08:52:46 -0700
commit1b1ed1b1fad3115c384a9543853416aa3882aa74 (patch)
treeb7d78cd7c6b008e3b0db228876e8a853ba4e1060
parentec0e51316bf129066c1c04719dcb934ee6143781 (diff)
downloadspack-1b1ed1b1fad3115c384a9543853416aa3882aa74.tar.gz
spack-1b1ed1b1fad3115c384a9543853416aa3882aa74.tar.bz2
spack-1b1ed1b1fad3115c384a9543853416aa3882aa74.tar.xz
spack-1b1ed1b1fad3115c384a9543853416aa3882aa74.zip
ci: continue to support SPACK_SIGNING_KEY (#39170)
-rw-r--r--lib/spack/spack/cmd/ci.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/spack/spack/cmd/ci.py b/lib/spack/spack/cmd/ci.py
index e55ca3fa8d..97a6a603c2 100644
--- a/lib/spack/spack/cmd/ci.py
+++ b/lib/spack/spack/cmd/ci.py
@@ -289,6 +289,10 @@ def ci_rebuild(args):
rebuild_everything = os.environ.get("SPACK_REBUILD_EVERYTHING")
require_signing = os.environ.get("SPACK_REQUIRE_SIGNING")
+ # If signing key was provided via "SPACK_SIGNING_KEY", then try to import it.
+ if signing_key:
+ spack_ci.import_signing_key(signing_key)
+
# Fail early if signing is required but we don't have a signing key
sign_binaries = require_signing is not None and require_signing.lower() == "true"
if sign_binaries and not spack_ci.can_sign_binaries():
@@ -418,11 +422,6 @@ def ci_rebuild(args):
dst_file = os.path.join(repro_dir, file_name)
shutil.copyfile(src_file, dst_file)
- # If signing key was provided via "SPACK_SIGNING_KEY", then try to
- # import it.
- if signing_key:
- spack_ci.import_signing_key(signing_key)
-
# Write this job's spec json into the reproduction directory, and it will
# also be used in the generated "spack install" command to install the spec
tty.debug("job concrete spec path: {0}".format(job_spec_json_path))
@@ -679,7 +678,7 @@ def ci_rebuild(args):
input_spec=job_spec,
buildcache_mirror_url=buildcache_mirror_url,
pipeline_mirror_url=pipeline_mirror_url,
- sign_binaries=sign_binaries,
+ sign_binaries=spack_ci.can_sign_binaries(),
):
msg = tty.msg if result.success else tty.warn
msg(