Skip to content
Snippets Groups Projects
.gitlab-ci.yml 25.25 KiB
image: alpine

variables:
  ## External images
  DOCKER_IMAGE: docker.io/docker:27.2.0
  SINGULARITY_IMAGE: quay.io/singularity/singularity:v3.11.5

  ## Default versions are specified in packages.yaml but can be overridden
  EDM4EIC_VERSION: ""
  EICRECON_VERSION: ""
  EPIC_VERSION: ""
  JUGGLER_VERSION: ""

  ## Local registry
  CI_PUSH: 1
  ## Dockerhub registry
  DH_REGISTRY: docker.io
  DH_REGISTRY_USER: eicweb
  DH_PUSH: 1
  ## GitHub registry
  GH_REGISTRY: ghcr.io
  GH_REGISTRY_USER: eic
  GH_PUSH: 1

  ## Number of jobs to start during container builds
  JOBS: 32

  ## is this nightly or not?
  NIGHTLY: ""
  ## Add to tag
  NIGHTLY_TAG: "nightly"

  ## Additional options for docker build (e.g. --no-cache)
  BUILD_OPTIONS: ""

  ## Version to be set by external trigger
  VERSION: ""

  ## Internal tag used for the CI
  INTERNAL_TAG: "pipeline-${CI_PIPELINE_ID}"

  PIPELINE_NAME: "$CI_COMMIT_TITLE"

stages:
  - status-pending
  - config
  - base            ## base OS image
  - eic             ## EIC container images
  - deploy          ## build/deploy singularity images
  - benchmarks
  - test
  - finalize
  - status-report

## only run CI for in the following cases:
## master, stable branch, release tag, MR event and nightly builds
## nightly builds are now part of the regular master build in order to keep
## all artifacts available at all times.
workflow:
  name: '$PIPELINE_NAME'
  rules:
    - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
    - if: '$CI_PIPELINE_SOURCE == "web"'
    - if: '$CI_PIPELINE_SOURCE == "webide"'
    - if: '$CI_PIPELINE_SOURCE == "trigger"'
    - if: '$CI_COMMIT_BRANCH == "master"'
    - if: '$CI_COMMIT_BRANCH =~ /^v[0-9]+\.[0-9]+-(alpha|beta|stable)/'          ## main stable branch: vX.Y-stable
    - if: '$CI_COMMIT_BRANCH =~ /^v[0-9]+\.[0-9]+-[a-z]+-(alpha|beta|stable)/'   ## special stable branch: vX.Y-acadia-stable (etc)
    - if: '$CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+/'            ## commit tags start with vX.Y.Z with optional suffix