summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Wittenburg <scott.wittenburg@kitware.com>2021-03-10 12:11:30 -0700
committerGitHub <noreply@github.com>2021-03-10 11:11:30 -0800
commit7b97fe206bc3c782612eb1be5b86cce99227fc6b (patch)
treeb8e3df942d21c28ba6ef6b6ba7cfba4563e9ce53
parent43473995ad6a8a6ef6dc78ae802a1cd1c84bf147 (diff)
downloadspack-7b97fe206bc3c782612eb1be5b86cce99227fc6b.tar.gz
spack-7b97fe206bc3c782612eb1be5b86cce99227fc6b.tar.bz2
spack-7b97fe206bc3c782612eb1be5b86cce99227fc6b.tar.xz
spack-7b97fe206bc3c782612eb1be5b86cce99227fc6b.zip
Pipelines: Fix issue that allowed failing jobs to pass (#22199)
This is a workaround for an issue with how "spack install" is invoked from within "spack ci rebuild". The fact that we don't get an exception or even the actual returncode when using the object returned by spack.util.executable.which('spack') to install the target spec means we get no indication of failures about the install command itself. Instead we rely on the subsequent buildcache creation failure to fail the job.
-rw-r--r--lib/spack/spack/ci.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/spack/spack/ci.py b/lib/spack/spack/ci.py
index b0e0b25191..ac79fb642e 100644
--- a/lib/spack/spack/ci.py
+++ b/lib/spack/spack/ci.py
@@ -1291,7 +1291,9 @@ def push_mirror_contents(env, spec, yaml_path, mirror_url, build_id,
if 'Access Denied' in err_msg:
tty.msg('Permission problem writing to {0}'.format(
mirror_url))
- tty.msg(err_msg)
+ tty.msg(err_msg)
+ else:
+ raise inst
def copy_stage_logs_to_artifacts(job_spec, job_log_dir):