Skip to content
Snippets Groups Projects
This GitLab CI configuration is valid. Learn more
.gitlab-ci.yml 8.90 KiB
image: eicweb.phy.anl.gov:4567/containers/image_recipes/ubuntu_dind:latest

variables:
  ## Base eic_dev image is testing. This puts the container at the same level as
  ## the nightly release. For now we tag the master as:
  ##  - juggler:testing (for CI usage)
  ##  - We also trigger the eic_container master to rebuild the jug_xl nightly
  EIC_DEV_TAG: "testing"
  JUGGLER_IMAGE: "juggler"
  DEFAULT_TAG: "testing"

  ## Other versions to be included in the container. In general these should be "master"
  ## to keep the container functionally identical to jug_xl:nightly
  JUGGLER_NPDET_VERSION: "master"
  JUGGLER_EICD_VERSION: "master"

  ## We have:
  ##   - Juggler triggers eic_container on a master pipeline
  ##   - eic_container triggers juggler on nightly builds
  ## this way jug_xl:nightly and juggler:testing are kept in sync

  ## We need to enable Docker Buildkit to use cache mounts and better
  ## build performance overal
  DOCKER_BUILDKIT: 1

  ## Dockerhub registry
  DH_REGISTRY_USER: eicweb
  DH_PUSH: 1
  ## GitHub registry
  GH_REGISTRY: ghcr.io
  GH_PUSH: 0

  ## TLS error resiliency: number of retries and second wait between tries 
  ## (wait time is doubled with each attempt)
  DOCKER_NTRIES: 5
  DOCKER_WAIT_TIME: 5

  ## variable set to 1 when triggered by eic_container nightly
  ## build. This is to avoid circular dependencies
  TRIGGERED_BY_NIGHTLY: 0

stages:
  - build
  - config
  - docker    ## build new version of juggler
  - deploy    ## repo-local singularity image for development work
  - analysis
  - finalize

workflow:
  ## Only rebuild on MRs and on commits to the master, as in other cases
  ## we should use the tagged jug_xl releases from eic_container.
  rules:
    - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
    - if: '$CI_COMMIT_BRANCH == "master"'

default:

## plan:
##  Workflows:
##  - master      --> config + docker (eic_container) + singularity (this repo)
##      --> trigger eic_container master
##  - MR          --> config + docker (eic_container) + singularity (this repo)
##  - upstream trigger from eic_container (nightly) --> run master
##
##  Container images tags
##  - master      --> nightly on eicweb & DH, and export to eic_container
##  - MR          --> unstable-mr-XXX (on eicweb only, untag at end of pipeline)

juggler:local: