From 38643dcd7e8ad9aa9efa477ac5518d6433291ea2 Mon Sep 17 00:00:00 2001 From: Scott Wittenburg Date: Thu, 17 Feb 2022 13:36:48 -0700 Subject: 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. --- lib/spack/spack/ci.py | 4 ++++ 1 file changed, 4 insertions(+) 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 -- cgit v1.2.3-60-g2f50