Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ebrains-spack-builds
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
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
Klaus Noelp
ebrains-spack-builds
Commits
96c98e27
Commit
96c98e27
authored
1 year ago
by
Eleni Mathioulaki
Browse files
Options
Downloads
Patches
Plain Diff
simplify artifact collection after_script
parent
1e64afd0
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+14
-30
14 additions, 30 deletions
.gitlab-ci.yml
with
14 additions
and
30 deletions
.gitlab-ci.yml
+
14
−
30
View file @
96c98e27
...
...
@@ -203,21 +203,13 @@ build-spack-env-on-runner:
-
cp /tmp/spack.yaml $SPACK_ENV/
-
spack install -y -j2 --fresh --test root
after_script
:
-
mkdir spack_logs
-
|
# succesfully installed packages: keep the spack logs for any package modified during this CI job
SPACK_PACKAGES_DIR=$SPACK_DEV_PATH/opt/spack/linux-ubuntu20.04-x86_64/gcc-10.3.0
if find $SPACK_PACKAGES_DIR -maxdepth 2 \( -name ".spack" -o -name ".spack_test_results" -o -name ".build" \) -exec cp -r --parents "{}" ./ \;; then
mv .$SPACK_PACKAGES_DIR spack_logs/installed
else
echo "No packages installed, so no logs to collect"
fi
# not succesfully installed packages: also keep the spack logs for any packages that failed
if cp --parents /tmp/$(whoami)/spack-stage/*/*.txt ./; then
mv ./tmp/$(whoami)/spack-stage spack_logs/not_installed
else
echo "No packages failed to build, so no logs to collect"
fi
-
mkdir -p $CI_PROJECT_DIR/spack_logs/installed $CI_PROJECT_DIR/spack_logs/not_installed
# for succesfully installed packages
:
keep the spack logs for any package modified during this CI job
-
cd $SPACK_DEV_PATH/opt/spack/linux-ubuntu20.04-x86_64/gcc-10.3.0
-
find . \( -name ".spack" -o -name ".spack_test_results" -o -name ".build" \) -exec cp -r --parents "{}" $CI_PROJECT_DIR/spack_logs/installed \;
# for not succesfully installed packages
:
also keep the spack logs for any packages that failed
-
cd /tmp/$(whoami)/spack-stage/
-
find . -maxdepth 2 -name "*.txt" -exec cp --parents "{}" $CI_PROJECT_DIR/spack_logs/not_installed \;
artifacts
:
paths
:
-
spack_logs
...
...
@@ -282,22 +274,14 @@ sync-gitlab-spack-instance:
-
spack install -y -j2 --fresh --test root
-
spack reindex
after_script
:
-
mkdir spack_logs
-
|
# succesfully installed packages: keep the spack logs for any package modified during this CI job
-
mkdir -p $CI_PROJECT_DIR/spack_logs/installed $CI_PROJECT_DIR/spack_logs/not_installed
# for succesfully installed packages
:
keep the spack logs for any package modified during this CI job
# (we use repo.yaml, that is modified at each start of the pipeline, as a reference file)
SPACK_PACKAGES_DIR=$SPACK_PATH/spack/opt/spack/linux-ubuntu20.04-x86_64/gcc-10.3.0
if find $SPACK_PACKAGES_DIR -maxdepth 2 \( -name ".spack" -o -name ".spack_test_results" -o -name ".build" \) -newer $SPACK_REPO_PATH/repo.yaml -exec cp -r --parents "{}" ./ \;; then
mv .$SPACK_PACKAGES_DIR spack_logs/installed
else
echo "No packages installed, so no logs to collect"
fi
# not succesfully installed packages: also keep the spack logs for any packages that failed
if cp --parents /tmp/$(whoami)/spack-stage/*/*.txt ./; then
mv ./tmp/$(whoami)/spack-stage spack_logs/not_installed
else
echo "No packages failed to build, so no logs to collect"
fi
-
cd $SPACK_PATH/spack/opt/spack/linux-ubuntu20.04-x86_64/gcc-10.3.0
-
find . \( -name ".spack" -o -name ".spack_test_results" -o -name ".build" \) -newer $SPACK_REPO_PATH/repo.yaml -exec cp -r --parents "{}" $CI_PROJECT_DIR/spack_logs/installed \;
# for not succesfully installed packages
:
also keep the spack logs for any packages that failed
-
cd /tmp/$(whoami)/spack-stage/
-
find . -maxdepth 2 -name "*.txt" -exec cp --parents "{}" $CI_PROJECT_DIR/spack_logs/not_installed \;
artifacts
:
paths
:
-
spack_logs
...
...
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