Commit 614ad29f authored by Julienne Lehmann's avatar Julienne Lehmann
Browse files

increase version

parent 26c2592c
Pipeline #73412 failed with stage
in 16 minutes and 20 seconds
......@@ -7,6 +7,10 @@ stages:
- test
- deploy
variables:
PACKAGENAME: 'dfpl'
VERSIONCOMPONENTTOINCREMENT: '-p'
# build the container
build:
stage: build
......@@ -16,36 +20,45 @@ build:
script:
- cd singularity_container/
- singularity build dfpl.sif dfpl.def
- |
apk add curl
VERSION=$(. ./increment_version.sh ${VERSIONCOMPONENTTOINCREMENT} ${LASTVERSION})
echo "${VERSION}" > version.txt
echo "${VERSION}" > version-${VERSION}.txt
echo "VERSION=${VERSION}" > version.env
curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ${PACKAGENAME}.${VERSION}.sif ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${PACKAGENAME}/${VERSION}/${PACKAGENAME}.${VERSION}.sif
artifacts:
paths:
- singularity_container/dfpl.sif
reports:
#propagates variables into the pipeline level, but never stores the actual file
dotenv: version.env
# run the container
test:
stage: test
tags:
- docker
- beta
dependencies:
- build
script:
- cd singularity_container/
- ./dfpl.sif
#test:
# stage: test
# tags:
# - docker
# - beta
# dependencies:
# - build
# script:
# - cd singularity_container/
# - ./dfpl.sif
# push the container to the Generic Packages Repository
deploy:
image: curlimages/curl:latest
stage: deploy
dependencies:
- build
- test
script:
- cd singularity_container/
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file dfpl.sif "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/singularity/latest/dfpl.sif"'
rules:
- if: $CI_COMMIT_TAG
variables:
IMAGE_TAG: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
variables:
IMAGE_TAG: 'latest'
#deploy:
# image: curlimages/curl:latest
# stage: deploy
# dependencies:
# - build
# - test
# script:
# - cd singularity_container/
# - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file dfpl.sif "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/singularity/latest/dfpl.sif"'
# rules:
# - if: $CI_COMMIT_TAG
# variables:
# IMAGE_TAG: $CI_COMMIT_TAG
# - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
# variables:
# IMAGE_TAG: 'latest'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment