Skip to content
Snippets Groups Projects
Commit 863412f5 authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

feat: adaptive pipeline

BREAKING CHANGE: change default workflow from Branch pipeline to MR pipeline
parent 37f89c66
No related branches found
No related tags found
No related merge requests found
...@@ -13,14 +13,33 @@ ...@@ -13,14 +13,33 @@
# program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth # program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
# Floor, Boston, MA 02110-1301, USA. # Floor, Boston, MA 02110-1301, USA.
# ========================================================================================= # =========================================================================================
# default workflow rules # default workflow rules: Merge Request pipelines
workflow: workflow:
rules: rules:
# exclude merge requests # prevent branch pipeline when an MR is open (prefer MR pipeline)
- if: $CI_MERGE_REQUEST_ID - if: '$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS'
when: never when: never
- when: always - when: always
# test job prototype: implement adaptive pipeline rules
.test-policy:
rules:
# on tag: auto & failing
- if: $CI_COMMIT_TAG
# on ADAPTIVE_PIPELINE_DISABLED: auto & failing
- if: '$ADAPTIVE_PIPELINE_DISABLED == "true"'
# on production or integration branch(es): auto & failing
- if: '$CI_COMMIT_REF_NAME =~ $PROD_REF || $CI_COMMIT_REF_NAME =~ $INTEG_REF'
# early stage (dev branch, no MR): manual & non-failing
- if: '$CI_MERGE_REQUEST_ID == null && $CI_OPEN_MERGE_REQUESTS == null'
when: manual
allow_failure: true
# Draft MR: auto & non-failing
- if: '$CI_MERGE_REQUEST_TITLE =~ /^Draft:.*/'
allow_failure: true
# else (Ready MR): auto & failing
- when: on_success
variables: variables:
# variabilized tracking image # variabilized tracking image
TBC_TRACKING_IMAGE: "$CI_REGISTRY/to-be-continuous/tools/tracking:master" TBC_TRACKING_IMAGE: "$CI_REGISTRY/to-be-continuous/tools/tracking:master"
...@@ -559,8 +578,7 @@ k8s-score: ...@@ -559,8 +578,7 @@ k8s-score:
# exclude when $K8S_SCORE_DISABLED is set # exclude when $K8S_SCORE_DISABLED is set
- if: '$K8S_SCORE_DISABLED == "true"' - if: '$K8S_SCORE_DISABLED == "true"'
when: never when: never
# else: allow failure - !reference [.test-policy, rules]
- allow_failure: true
# Deploy job prototype # Deploy job prototype
# Can be extended to define a concrete environment # Can be extended to define a concrete environment
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment