Skip to content
Snippets Groups Projects
Select Git revision
  • jeppelt-master-patch-6e12
  • master default protected
  • test_basis_ml
  • WS22
  • SS22
  • GPU
  • SS21
  • TP2-WZH-SS21
  • WS20
  • docker
10 results

.gitlab-ci.yml

Blame
  • .gitlab-ci.yml 3.15 KiB
    stages:
      - 🏗️ build_and_push
      - create_jupytermachine_version
    
    variables:
      DOCKER_HUB_USER: "jeppelt"
    
    .common_build:
      image: docker:latest
      stage: 🏗️ build_and_push
      before_script:
        - docker login -u "$DOCKER_HUB_USER" -p $DOCKER_TOKEN
      script:
          - docker build -t "$DOCKER_HUB_USER/etp_$IMAGE_NAME" $IMAGE_NAME --no-cache;
          - docker push "$DOCKER_HUB_USER/etp_$IMAGE_NAME";
    
    basis:
      variables:
        IMAGE_NAME: "basis"
      extends:
        - .common_build
      rules: # only execute if Dockerfile was changed
        - changes: 
          - $IMAGE_NAME/Dockerfile
    
    tp:
      variables:
        IMAGE_NAME: "tp"
      extends:
        - .common_build
      needs:  # if the build_and_push step basis has to be done, then make the other build_and_push steps dependend of it
        - job: basis
          optional: true # only run if basis is added to the pipeline (depends on the rules).
      rules: # only execute if Dockerfile or basis/Dockerfile was changed
        - changes: 
          - $IMAGE_NAME/Dockerfile
          - basis/*
    
    python311:
      variables:
        IMAGE_NAME: "python311"
      extends:
        - .common_build
      rules: # only execute if Dockerfile was changed
        - changes: 
          - $IMAGE_NAME/Dockerfile
          
    basis_jupytermachine:
      variables:
        IMAGE_NAME: "basis_jupytermachine"
      extends:
        - .common_build
      needs:  # if the build_and_push step basis has to be done, then make the other build_and_push steps dependend of it
        - job: basis
          optional: true # only run if basis is added to the pipeline (depends on the rules).
      rules: # only execute if Dockerfile or basis/Dockerfile was changed
        - changes: 
          - $IMAGE_NAME/Dockerfile
          - basis/*
          
    tp_herwig:
      variables:
        IMAGE_NAME: "tp_herwig"
      extends:
        - .common_build
      needs:  # if the build_and_push step basis has to be done, then make the other build_and_push steps dependend of it
        - job: tp
          optional: true # only run if basis is added to the pipeline (depends on the rules).
      rules: # only execute if Dockerfile or tp/Dockerfile was changed
        - changes: