summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorScott Wittenburg <scott.wittenburg@kitware.com>2022-02-17 13:36:48 -0700
committerGitHub <noreply@github.com>2022-02-17 15:36:48 -0500
commit38643dcd7e8ad9aa9efa477ac5518d6433291ea2 (patch)
tree2ed8e4995cff67041082607d37cb779722c1fc63 /lib
parente7e6a16064c79c6ec80e0279e0b7507a814a1924 (diff)
downloadspack-38643dcd7e8ad9aa9efa477ac5518d6433291ea2.tar.gz
spack-38643dcd7e8ad9aa9efa477ac5518d6433291ea2.tar.bz2
spack-38643dcd7e8ad9aa9efa477ac5518d6433291ea2.tar.xz
spack-38643dcd7e8ad9aa9efa477ac5518d6433291ea2.zip
gitlab: Propagate stack name to downstream build jobs (#29019)
It will be useful for metrics gathering and possibly debugging to have this environment variable available in the runner pods that do the actual rebuilds.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/ci.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/spack/spack/ci.py b/lib/spack/spack/ci.py
index 93c6bf11b4..5ddb7390e8 100644
--- a/lib/spack/spack/ci.py
+++ b/lib/spack/spack/ci.py
@@ -1114,6 +1114,10 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
if pr_mirror_url:
output_object['variables']['SPACK_PR_MIRROR_URL'] = pr_mirror_url
+ spack_stack_name = os.environ.get('SPACK_CI_STACK_NAME', None)
+ if spack_stack_name:
+ output_object['variables']['SPACK_CI_STACK_NAME'] = spack_stack_name
+
sorted_output = {}
for output_key, output_value in sorted(output_object.items()):
sorted_output[output_key] = output_value