Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scitas-software-stacks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
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
SCITAS
Software stack
scitas-software-stacks
Commits
31a5b808
Commit
31a5b808
authored
7 months ago
by
Nicolas Richart
Browse files
Options
Downloads
Patches
Plain Diff
Adding deploy step to keep everythng per MR
parent
b2c4152a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!3
Feat/stack pinot noir
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+6
-7
6 additions, 7 deletions
.gitlab-ci.yml
ci/apptainer_by_hand.sh
+4
-2
4 additions, 2 deletions
ci/apptainer_by_hand.sh
ci/prepare_squashfs.sh
+18
-9
18 additions, 9 deletions
ci/prepare_squashfs.sh
with
28 additions
and
18 deletions
.gitlab-ci.yml
+
6
−
7
View file @
31a5b808
...
...
@@ -71,7 +71,7 @@ variables:
FAKEHOME
:
"
/scratch/$(id
-un)"
COMMAND_OPTIONS_SBATCH
:
${slurm_options}
STACK_VERSION
:
$(jq -Mrc .stack.version ${CI_PROJECT_DIR}/stacks/${stack}/config.json)
image_name
:
"
${stack}-${environment}-${SQUASHFS_ID}-${CI_PIPELINE_ID}
"
image_name
:
${stack}-${environment}-${SQUASHFS_ID}-${CI_PIPELINE_ID}
squashfs_image
:
$(ls -t1 ${CI_DATA_LT}/squashfs-cache/${image_name}*.sqfs 2> /dev/null | head -1)
APPTAINER_EXEC_OPTIONS
:
>-
${apptainer_options}
...
...
@@ -210,11 +210,10 @@ spack:mksquashfs:
script
:
-
source ci/stack_env.sh
-
echo "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/stack/${stack}/stack-
${stack}-${environment}-${
CI_COMMIT_REF_SLUG
}.sqfs
"
-
"
mksquashfs
${STACK_LOCATION}
stack-${stack}-${environment}-${CI_COMMIT_REF_SLUG}.sqfs"
-
'
curl
--header
"JOB-TOKEN:
$CI_JOB_TOKEN"
--upload-file
stack-${stack}-${environment}-${CI_COMMIT_REF_SLUG}.sqfs
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/stack/${stack}/stack-${stack}-${environment}-${CI_COMMIT_REF_SLUG}.sqfs"'
-
mksquashfs ${STACK_LOCATION}
${stack}-${environment}-${
SQUASH_ID
}.sqfs
#
-
echo "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/stack/${stack}/
stack-${stack}-${environment}-${CI_COMMIT_REF_SLUG}.sqfs"
#
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file stack-${stack}-${environment}-${CI_COMMIT_REF_SLUG}.sqfs "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/stack/${stack}/stack-${stack}-${environment}-${CI_COMMIT_REF_SLUG}.sqfs"'
needs
:
-
job
:
spack:install
timeout
:
10h
rules
:
-
if
:
$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
ressource_group
:
mksquashfs
timeout
:
1h
This diff is collapsed.
Click to expand it.
ci/apptainer_by_hand.sh
+
4
−
2
View file @
31a5b808
...
...
@@ -20,8 +20,10 @@ export STACK_VERSION=$(jq -Mrc .stack.version ${CI_PROJECT_DIR}/stacks/${stack}/
APPTAINER_IMAGE
=
~/rhel9-kuma.sif
image_name
=
${
stack
}
-
${
environment
}
-
${
SQUASHFS_ID
}
-
${
CI_PIPELINE_ID
}
./ci/prepare_squashfs.sh
squashfs_image
=
$(
ls
-t1
${
CI_DATA_LT
}
/squashfs-cache/
${
image_name
}*
.sqfs 2> /dev/null |
head
-1
)
#./ci/prepare_squashfs.sh
srun
${
srun_options
}
--pty
apptainer run
\
${
apptainer_options
}
\
...
...
@@ -36,7 +38,7 @@ srun ${srun_options} --pty apptainer run \
--env
environment
=
${
environment
}
\
--env
GPG_PRIVATE_KEY
=
${
GPG_PRIVATE_KEY
}
\
--env
CI_PROJECT_DIR
=
${
CI_PROJECT_DIR
}
\
--env
CI_
JOB
_ID
=
${
CI_
JOB
_ID
}
\
--env
CI_
PIPELINE
_ID
=
${
CI_
PIPELINE
_ID
}
\
--env
SQUASHFS_ID
=
${
SQUASHFS_ID
}
\
--fusemount
"host:
${
CI_PROJECT_DIR
}
/ci/squashfuse_ll.sh
${
CI_DATA_ST
}
${
image_name
}
${
squashfs_image
}
/overlayfs/lower-
${
image_name
}
"
\
--fusemount
"container:
${
CI_PROJECT_DIR
}
/ci/fuse-overlayfs.sh
${
image_name
}
${
MOUNT_POINT
}
/
${
stack
}
/
${
environment
}
/
${
STACK_VERSION
}
"
\
...
...
This diff is collapsed.
Click to expand it.
ci/prepare_squashfs.sh
+
18
−
9
View file @
31a5b808
...
...
@@ -21,20 +21,29 @@ set +o errexit
sqfs_image
=
$(
ls
-t1
${
CI_DATA_LT
}
/squashfs-cache/
${
image_name
}
.sqfs 2> /dev/null |
head
-1
)
if
[
$?
-ne
0
]
then
echo
"No MR (
$squash_id
) squashfs found"
# Check if MR default branch as squashfs
sqfs_base_image
=
$(
ls
-t1
${
CI_DATA_LT
}
/squashfs-cache/
${
stack
}
-
${
environment
}
-
${
squash_base
}*
.sqfs 2> /dev/null |
head
-1
)
echo
"No MR (
$squash_id
-
${
CI_PIPELINE_ID
}
) squashfs found"
# look for base in the branch
sqfs_base_image
=
$(
ls
-t1
${
CI_DATA_LT
}
/squashfs-cache/
${
stack
}
-
${
environment
}
-
${
squash_id
}
.sqfs 2> /dev/null |
head
-1
)
if
[
$?
-ne
0
]
then
echo
"No default branch (
$squash_base
) squashfs found"
echo
"Creating an empty one"
empty
=
$(
mktemp
-d
)
sqfs_base_image
=
"
${
CI_DATA_LT
}
/squashfs-cache/
${
stack
}
-
${
environment
}
-
${
squash_base
}
-initial.sqfs"
mksquashfs
${
empty
}
${
sqfs_base_image
}
echo
"No MR (
$squash_id
) squashfs found"
# look for base in default branch
sqfs_base_image
=
$(
ls
-t1
${
CI_DATA_LT
}
/squashfs-cache/
${
stack
}
-
${
environment
}
-
${
squash_base
}*
.sqfs 2> /dev/null |
head
-1
)
if
[
$?
-ne
0
]
then
echo
"No default branch (
$squash_base
) squashfs found"
echo
"Creating an empty one"
empty
=
$(
mktemp
-d
)
sqfs_base_image
=
"
${
CI_DATA_LT
}
/squashfs-cache/
${
stack
}
-
${
environment
}
-
${
squash_base
}
-initial.sqfs"
mksquashfs
${
empty
}
${
sqfs_base_image
}
else
echo
"Found
${
sqfs_base_image
}
"
fi
else
echo
"Found
${
sqfs_base_image
}
"
fi
set
-o
errexit
# Link MR sqaushfs to the one of default branch
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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