summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2023-12-19 10:26:53 +0100
committerGitHub <noreply@github.com>2023-12-19 01:26:53 -0800
commit2ef8d09fc78f44f2f60b165f65595fccc161a54c (patch)
treead6af2551891d44aa81f6a8120e1b694653b1ecf /share
parente5e767b3001d49f0ddf917aba1ce6d15b5708d13 (diff)
downloadspack-2ef8d09fc78f44f2f60b165f65595fccc161a54c.tar.gz
spack-2ef8d09fc78f44f2f60b165f65595fccc161a54c.tar.bz2
spack-2ef8d09fc78f44f2f60b165f65595fccc161a54c.tar.xz
spack-2ef8d09fc78f44f2f60b165f65595fccc161a54c.zip
`spack config get`/`blame`: with no args, show entire config
This PR changes the default behavior of `spack config get` and `spack config blame` to print a flattened version of the entire spack configuration, including any active environment, if the commands are invoked with no section arguments. The new behavior is used in Gitlab CI to help debug CI configuration, but it can also be useful when asking for more information in issues, or when simply debugging Spack.
Diffstat (limited to 'share')
-rw-r--r--share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml7
1 files changed, 7 insertions, 0 deletions
diff --git a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml
index e1d7561300..0c770ee872 100644
--- a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml
+++ b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml
@@ -150,6 +150,13 @@ default:
- spack python -c "import os,sys; print(os.path.expandvars(sys.stdin.read()))"
< "${SPACK_CI_CONFIG_ROOT}/${PIPELINE_MIRROR_TEMPLATE}" > "${SPACK_CI_CONFIG_ROOT}/mirrors.yaml"
- spack config add -f "${SPACK_CI_CONFIG_ROOT}/mirrors.yaml"
+ - mkdir -p "${CI_PROJECT_DIR}/jobs_scratch_dir"
+ - spack
+ --config-scope "${SPACK_CI_CONFIG_ROOT}"
+ --config-scope "${SPACK_CI_CONFIG_ROOT}/${SPACK_TARGET_PLATFORM}"
+ --config-scope "${SPACK_CI_CONFIG_ROOT}/${SPACK_TARGET_PLATFORM}/${SPACK_TARGET_ARCH}"
+ ${CI_STACK_CONFIG_SCOPES}
+ config blame > "${CI_PROJECT_DIR}/jobs_scratch_dir/spack.yaml.blame"
- spack -v --color=always
--config-scope "${SPACK_CI_CONFIG_ROOT}"
--config-scope "${SPACK_CI_CONFIG_ROOT}/${SPACK_TARGET_PLATFORM}"