Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ebrains-spack-builds
Manage
Activity
Members
Labels
Plan
Issues
38
Issue boards
Milestones
Wiki
Code
Merge requests
26
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EBRAINS RI
Tech Hub
Platform
EBRAINS Software Distribution
ebrains-spack-builds
Commits
0a1858c3
Commit
0a1858c3
authored
1 year ago
by
Eleni Mathioulaki
Browse files
Options
Downloads
Patches
Plain Diff
don't modify spack.yaml if no site-specific spack.yaml exists
parent
cb4d4d24
No related branches found
Branches containing commit
No related tags found
2 merge requests
!368
create new experimental release
,
!367
Add site specific configs
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
install_spack_env.sh
+0
-2
0 additions, 2 deletions
install_spack_env.sh
site-config/ymerge.py
+12
-2
12 additions, 2 deletions
site-config/ymerge.py
with
12 additions
and
4 deletions
install_spack_env.sh
+
0
−
2
View file @
0a1858c3
...
...
@@ -57,8 +57,6 @@ spack env activate $EBRAINS_SPACK_ENV
# update environment site-configs
rm
-rf
$SPACK_ENV
/site-config
&&
cp
-r
$EBRAINS_REPO
/site-config
$SPACK_ENV
# update spack.yaml: merge top-level and site-specific spack.yaml files
# TODO: find a more robust way to do this (maybe with yq? but we need to download the binary)
# TODO: or add pyyaml to dependencies and use python script
spack-python
$EBRAINS_REPO
/site-config/ymerge.py
$EBRAINS_REPO
/spack.yaml
$EBRAINS_REPO
/site-config/
$SYSTEMNAME
/spack.yaml
>
/tmp/spack.yaml
cp
/tmp/spack.yaml
$SPACK_ENV
/
...
...
This diff is collapsed.
Click to expand it.
site-config/ymerge.py
+
12
−
2
View file @
0a1858c3
import
sys
# spack-python script that merges two environment configuration files (spack.yaml) into one
# Usage: spack-python /path/to/first/spack.yaml /path/to/second/spack.yaml
# (note: if the second file does not exist, the output is the first file
import
sys
,
os
from
spack.config
import
merge_yaml
,
read_config_file
,
syaml
print
(
syaml
.
dump
(
merge_yaml
(
read_config_file
(
sys
.
argv
[
1
]),
read_config_file
(
sys
.
argv
[
2
]))))
if
not
os
.
path
.
exists
(
sys
.
argv
[
2
]):
merged
=
syaml
.
dump
(
read_config_file
(
sys
.
argv
[
1
]))
else
:
merged
=
syaml
.
dump
(
merge_yaml
(
read_config_file
(
sys
.
argv
[
1
]),
read_config_file
(
sys
.
argv
[
2
])))
print
(
merged
)
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment