diff --git a/templates/gitlab-ci-sonar.yml b/templates/gitlab-ci-sonar.yml index a39a81a3372a49bf2d59f46bb9381ac96ee90092..a198502a683ca1173cfa0792cef6db02bdc636f3 100644 --- a/templates/gitlab-ci-sonar.yml +++ b/templates/gitlab-ci-sonar.yml @@ -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" @@ -289,9 +297,6 @@ sonar: - if [[ "$SONAR_GITLAB_TOKEN" ]]; then sonar_extra_args=$SONAR_GITLAB_ARGS; fi - sonar-scanner ${TRACE+-Dsonar.verbose=true} $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 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