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

chore: use workflow rules

parent 124762bc
No related branches found
No related tags found
No related merge requests found
......@@ -13,6 +13,14 @@
# program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
# Floor, Boston, MA 02110-1301, USA.
# =========================================================================================
# default workflow rules
workflow:
rules:
# exclude merge requests
- if: $CI_MERGE_REQUEST_ID
when: never
- when: always
variables:
# variabilized tracking image
TBC_TRACKING_IMAGE: "$CI_REGISTRY/to-be-continuous/tools/tracking:master"
......@@ -463,9 +471,6 @@ mvn-build:
- "${MAVEN_PROJECT_DIR}/**/target/*-reports/TEST-*.xml"
paths:
- "${MAVEN_PROJECT_DIR}/**/target"
rules:
# exclude merge requests
- if: '$CI_MERGE_REQUEST_ID == null'
# Sonar job
mvn-sonar:
......@@ -481,9 +486,6 @@ mvn-sonar:
- mvn ${TRACE+-Dsonar.verbose=true} $MAVEN_CLI_OPTS $mvn_settings_opt $java_proxy_args ${SONAR_AUTH_TOKEN+-Dsonar.login=$SONAR_AUTH_TOKEN} ${SONAR_LOGIN+-Dsonar.login=$SONAR_LOGIN} ${SONAR_PASSWORD+-Dsonar.password=$SONAR_PASSWORD} $SONAR_BASE_ARGS $sonar_extra_args $sonar_mr_args
- if [[ "$SONAR_QUALITY_GATE_ENABLED" == "true" ]]; then sonar_quality_gate_check; fi
rules:
# exclude merge requests
- if: $CI_MERGE_REQUEST_ID
when: never
# exclude if $SONAR_URL not set
- if: '$SONAR_URL == null || $SONAR_URL == ""'
when: never
......@@ -506,9 +508,6 @@ mvn-dependency-check:
script:
- mvn ${TRACE+-X} $MAVEN_CLI_OPTS $mvn_settings_opt $java_proxy_args $MAVEN_DEPENDENCY_CHECK_ARGS
rules:
# exclude merge requests
- if: $CI_MERGE_REQUEST_ID
when: never
# on schedule: auto
- if: '$CI_PIPELINE_SOURCE == "schedule"'
allow_failure: true
......@@ -529,9 +528,6 @@ mvn-forbid-snapshot-dependencies:
script:
- mvn ${TRACE+-X} $MAVEN_CLI_OPTS $mvn_settings_opt $java_proxy_args org.apache.maven.plugins:maven-enforcer-plugin:3.0.0:enforce -Drules=requireReleaseDeps
rules:
# exclude merge requests
- if: $CI_MERGE_REQUEST_ID
when: never
# exclude if disabled
- if: '$MVN_FORBID_SNAPSHOT_DEPENDENCIES_DISABLED == "true"'
when: never
......@@ -546,9 +542,6 @@ mvn-snapshot:
script:
- perform_snapshot
rules:
# exclude merge requests
- if: $CI_MERGE_REQUEST_ID
when: never
# on tags: never
- if: $CI_COMMIT_TAG
when: never
......@@ -584,9 +577,6 @@ mvn-release:
fi
- mvn ${TRACE+-X} $MAVEN_CLI_OPTS $mvn_settings_opt $java_proxy_args $scm_auth_args ${MAVEN_RELEASE_ARGS} ${semrel_args} -DscmCommentPrefix="$MAVEN_RELEASE_SCM_COMMENT_PREFIX"
rules:
# exclude merge requests
- if: $CI_MERGE_REQUEST_ID
when: never
# on production branch(es): manual & non-blocking if $MAVEN_DEPLOY_ENABLED is set
- if: '$MAVEN_DEPLOY_ENABLED == "true" && $CI_COMMIT_REF_NAME =~ $PROD_REF'
when: manual
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment