Commit 364a6ea9 authored by GRASLAND Hadrien's avatar GRASLAND Hadrien
Browse files

Merge branch 'ci-fix' into 'develop'

Résolution du problème des pipelines "detached"

See merge request !8
parents eef99757 0869ffbc
Pipeline #185954 passed with stages
in 10 minutes and 52 seconds
......@@ -9,7 +9,7 @@ variables:
OFFICIAL_SOPHYA_ENV: "${CI_REGISTRY_IMAGE}:latest"
SOPHYABASE: "/usr/local/SOPHYA"
# Docker image used for building work
# Docker image used for all purposes but environment building
default:
image: "${BUILD_ENV}"
......@@ -23,6 +23,15 @@ stages:
- cleanup-sophya
- cleanup-env
# Allow both push and merge request pipelines, but only run one of them: if
# a branch has opened merge requests, then stop running regular branch pipelines
# for this branch.
workflow:
rules:
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
when: never
- when: always
# Template for jobs that build Docker images
.docker-build:
image:
......@@ -241,7 +250,7 @@ Deploy docker images:
--destination "${OFFICIAL_IMAGE}"
done
rules:
- if: ($CI_PROJECT_PATH == "SOPHYA/Sophya") && ($CI_COMMIT_REF_NAME == "develop")
- if: ($CI_PROJECT_PATH == "SOPHYA/Sophya") && ($CI_COMMIT_REF_NAME == "develop") && ($CI_PIPELINE_SOURCE != "merge_request_event")
# === Whether CI succeeded or not, discard artifacts that won't be reused (cleanup stage) ===
......
......@@ -12,6 +12,15 @@ default:
stages:
- test
# Allow both push and merge request pipelines, but only run one of them: if
# a branch has opened merge requests, then stop running regular branch pipelines
# for this branch.
workflow:
rules:
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
when: never
- when: always
# Commonalities between all test jobs
.sophya-test:
stage: test
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment