variables:
  DOCKER_DRIVER: overlay2

stages:
  - build

.retry_twice:
  retry:
    max: 2
    when:
      - runner_system_failure
      - stuck_or_timeout_failure

natif-build:
  extends: .retry_twice
  stage: build
  image: registry.orfeo-toolbox.org/sdinot/otb:ubuntu-18.04-gccV0.2
  script:
    - echo ${CI_MERGE_REQUEST_PROJECT_PATH}
#    - ctest -VV -S CI/main_ci.cmake \
#      "-DCTEST_SITE:string=${CI_MERGE_REQUEST_PROJECT_PATH}_ubuntu-18.04"

shark-build:
  extends: .retry_twice
  stage: build
  image: registry.orfeo-toolbox.org/sdinot/otb:ubuntu18.04-shark3.1.4
  script:
    - echo $CI_MERGE_REQUEST_PROJECT_PATH
    # - ctest -VV -S CI/main_ci.cmake \
    #   -DCTEST_SITE:string=${CI_MERGE_REQUEST_PROJECT_PATH}_ubuntu18.04-shark3.1.4
variables:
  DOCKER_DRIVER: overlay2
  SITE_NAME: $CI_MERGE_REQUEST_PROJECT_PATH

stages:
  - build

.retry_twice:
  retry:
    max: 2
    when:
      - runner_system_failure
      - stuck_or_timeout_failure

natif-build:
  extends: .retry_twice
  stage: build
  image: registry.orfeo-toolbox.org/sdinot/otb:ubuntu-18.04-gccV0.2
  script:
    - echo ${SITE_NAME}
#    - ctest -VV -S CI/main_ci.cmake \
#      "-DCTEST_SITE:string=${CI_MERGE_REQUEST_PROJECT_PATH}_ubuntu-18.04"

shark-build:
  extends: .retry_twice
  stage: build
  image: registry.orfeo-toolbox.org/sdinot/otb:ubuntu18.04-shark3.1.4
  script:
    - echo $SITE_NAME
    # - ctest -VV -S CI/main_ci.cmake \
    #   -DCTEST_SITE:string=${CI_MERGE_REQUEST_PROJECT_PATH}_ubuntu18.04-shark3.1.4
Test to retreive value of CI_MERGE_REQUEST_PROJECT_PATH
Test to retreive value of CI_MERGE_REQUEST_PROJECT_PATH
