Skip to content
Snippets Groups Projects
Commit 36ab0a4b authored by Nandam, Srinivasa Rao (PG/R - Comp Sci & Elec Eng)'s avatar Nandam, Srinivasa Rao (PG/R - Comp Sci & Elec Eng)
Browse files

Apptainer yml file

parent 2b6ef1db
No related branches found
No related tags found
No related merge requests found
stages:
- build
- push
Build:
tags:
- apptainer
- build
stage: build
script:
- apptainer build ${CI_PROJECT_NAME}.sif container.def
# Tag the "main" branch as "latest"
Push latest:
variables:
# We do not need GitLab to clone the source code.
GIT_STRATEGY: none
stage: push
tags:
- apptainer
- build
# Only "main" should be tagged "latest"
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
script:
- apptainer push ${CI_PROJECT_NAME}.sif oras://container-registry.surrey.ac.uk/shared-containers/${CI_PROJECT_NAME}:latest
Push branch:
variables:
# We do not need GitLab to clone the source code.
GIT_STRATEGY: none
stage: push
tags:
- apptainer
- build
rules:
- if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
script:
- apptainer push ${CI_PROJECT_NAME}.sif oras://container-registry.surrey.ac.uk/shared-containers/${CI_PROJECT_NAME}:SHA_$CI_COMMIT_SHORT_SHA
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment