-
LEMERCIER Denis authoredLEMERCIER Denis authored
.gitlab-ci.yml 2.32 KiB
variables:
ONLY:
value: ""
description: "List of components to build: common core calculs api-expositiondonneesentrees api-referentiel api-event-donneesentrees api-event-calculs"
MODE:
value: "build"
options:
- "build"
- "dependency-check"
description: "Mode: build or dependency-check"
.maven-components: &maven-components
matrix:
- COMPONENT: [ api-expositiondonneesentrees, api-referentiel, api-event-donneesentrees, api-event-calculs ]
.libraries: &libraries
matrix:
- COMPONENT: [ common, calculs ]
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: never
- if: $CI_COMMIT_BRANCH =~ /doc.*/
when: never
- if: $CI_COMMIT_REF_NAME =~ /g4it.*/
when: always
- if: $CI_COMMIT_REF_NAME =~ /main|develop|\d+\.\d+\.\d+/
when: always
clear cache maven:
stage: .pre
script:
- rm -rf .m2/
cache:
paths:
- .m2/
core:
stage: .pre
variables:
COMPONENT: $COMPONENT
MODE: $MODE
trigger:
include: "services/common/.gitlab-ci-library.yml"
strategy: depend
rules:
- if: $COMPONENT =~ $ONLY
when: always
- if: $ONLY == ""
changes:
- services/$COMPONENT/**/*
parallel:
matrix:
- COMPONENT: [ core ]
child-lib:
stage: build
variables:
COMPONENT: $COMPONENT
MODE: $MODE
DISABLE_DEP_CHECK: "true"
DISABLE_SONAR: "true"
trigger:
include: "services/common/.gitlab-ci-library.yml"
strategy: depend
rules:
- if: $COMPONENT =~ $ONLY
when: always