summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorJonathon Anderson <17242663+blue42u@users.noreply.github.com>2022-08-02 13:45:50 -0500
committerGitHub <noreply@github.com>2022-08-02 11:45:50 -0700
commit8c50ea9dc0715617405a5f6688babbe9e317b32c (patch)
tree2ad7afb9dfd2a179c75094ebb9a904acbd447bb2 /share
parent6e0b7959a46ae2ff92af78524a50943179a12f0e (diff)
downloadspack-8c50ea9dc0715617405a5f6688babbe9e317b32c.tar.gz
spack-8c50ea9dc0715617405a5f6688babbe9e317b32c.tar.bz2
spack-8c50ea9dc0715617405a5f6688babbe9e317b32c.tar.xz
spack-8c50ea9dc0715617405a5f6688babbe9e317b32c.zip
spack ci rebuild: Don't install in a login shell (#31771)
On some systems the shell in login mode wipes important parts of the environment, such as PATH. This causes the build to fail since it can't find `spack`. For better robustness, don't use a login shell. In a full CI job the final spack install is run in an environment formed by scripts running in this order: export AWS_SECRET=... # 1. Load environment from GitLab project variables source spack/share/spack/setup-env.sh # 2. Load Spack into the environment (PATH) spack env activate -V concrete_env # 3. Activate the concrete environment source /etc/profile # 4. Bash login shell (from -l) spack install ... Whereas when a user launches their own container with (docker|podman) run -it, they end up running spack install in an environment formed in this order: source /etc/bash.bashrc # (not 4). Bash interactive shell (default with TTY) export AWS_SECRET=... #~1. Manually load environment from GitLab project variables source spack/share/spack/setup-env.sh # 2. Load Spack into the environment (PATH) spack env activate -V concrete_env # 3. Activate the concrete environment spack install ... The big problem being that (4) has a completely different position and content (on Leap 15 and possibly other containers). So in context, this PR removes (4) from the CI job case, leaving us with the simpler: export AWS_SECRET=... # 1. Load environment from GitLab project variables source spack/share/spack/setup-env.sh # 2. Load Spack into the environment (PATH) spack env activate -V concrete_env # 3. Activate the concrete environment spack install ...
Diffstat (limited to 'share')
0 files changed, 0 insertions, 0 deletions