Skip to content
Snippets Groups Projects

Re-factor repository workflow

Merged Sylvester Joosten requested to merge 13-re-factor-repository-workflow into master
Compare and
20 files
+ 285
1058
Compare changes
  • Side-by-side
  • Inline
Files
20
+ 81
0
 
image: eicweb.phy.anl.gov:4567/containers/image_recipes/ubuntu_dind:latest
 
 
stages:
 
- build
 
- config
 
- package
 
- singularity
 
 
## variables:
 
## - TARGET_XXX: docker build target (including cache modifier)
 
## (stable, stable-cached, unstable, unstable-cached)
 
## - TAG: main docker tag to be used internally
 
## (e.g. 2.5-stable/unstable/<version>)
 
## - PUBLISH: docker publish directives
 
variables:
 
TARGET_BUILDER: @TARGET_BUILDER@
 
TARGET_RELEASE: @TARGET_RELEASE@
 
TAG: @TAG@
 
PUBLISH: @PUBLISH@
 
 
defaults:
 
tags:
 
- silicon
 
 
builder:
 
stage: build
 
script:
 
- cp -r spack containers/builder/np-spack
 
- cd containers/builder
 
- head Dockerfile
 
- make login
 
- echo "Creating builder image for: $TARGET_BUILDER"
 
- make $TARGET_BUILDER
 
- echo "Publishing image: $PUBLISH"
 
- make $PUBLISH
 
 
config:
 
image: eicweb.phy.anl.gov:4567/containers/eic_container/eic_builder:$TAG
 
stage: config
 
needs: ["builder"]
 
script:
 
- bash containers/release/configure_release.sh $TAG
 
artifacts:
 
paths:
 
- config
 
 
release:docker:
 
stage: package
 
needs: ["config"]
 
script:
 
- cp config/Dockerfile containers/release/Dockerfile
 
- cp config/eic-env.sh containers/release/eic-env.sh
 
- cd containers/release
 
- make login
 
- echo "Creating release image for: $TARGET_RELEASE"
 
- make $TARGET_RELEASE
 
- echo "Publishing image: $PUBLISH"
 
- make $PUBLISH
 
 
release:singularity:
 
stage: singularity
 
needs: ["release:docker"]
 
rules:
 
- if: '$CI_COMMIT_BRANCH == "master"'
 
when: on_success
 
- if: '$CI_COMMIT_BRANCH == "v$TAG"'
 
when: on_success
 
- if: '$CI_COMMIT_TAG == "v$TAG"'
 
when: on_success
 
script:
 
- cp config/eic.def eic.def
 
- /bin/bash .gitlabci/setup.sh
 
- /bin/bash .gitlabci/build.sh eic.def
 
- mkdir -p build
 
- cp eic.sif build/.
 
- cp eic.def build/.
 
artifacts:
 
expire_in: 90 days
 
paths:
 
- build/eic.sif
 
- build/eic.def
Loading