diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 29cccd19..16ff380f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -51,33 +51,6 @@ job_update: # ~~~~~~~~~~~~~~~~~~~~~~~~ -job_sonarqube_check: - tags: - - docker - stage: test - image: - name: sonarsource/sonar-scanner-cli:latest - entrypoint: [""] - variables: - SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache - GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task - cache: - key: "${CI_JOB_NAME}" - paths: - - .sonar/cache - script: - - sonar-scanner - allow_failure: true - needs: - - job: job_integration_test - artifacts: true - rules: - - if: $CI_PIPELINE_SOURCE == "merge_request_event" - allow_failure: true - - if: $CI_COMMIT_BRANCH =~ /^(master)$/ && $CI_PIPELINE_SOURCE !~ /^(web)$/ - allow_failure: true - - if: $CI_COMMIT_BRANCH =~ /^(release)$/ - job_integration_test: environment: $GITLAB_ENV stage: test @@ -128,6 +101,33 @@ job_integration_test: - if: $CI_COMMIT_BRANCH =~ /^(master)$/ - if: $CI_PIPELINE_SOURCE == "web" +job_sonarqube_check: + tags: + - docker + stage: test + image: + name: sonarsource/sonar-scanner-cli:latest + entrypoint: [""] + variables: + SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache + GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task + cache: + key: "${CI_JOB_NAME}" + paths: + - .sonar/cache + script: + - sonar-scanner + allow_failure: true + needs: + - job: job_integration_test + artifacts: true + rules: + - if: $CI_PIPELINE_SOURCE == "merge_request_event" + allow_failure: true + - if: $CI_COMMIT_BRANCH =~ /^(master)$/ && $CI_PIPELINE_SOURCE !~ /^(web)$/ + allow_failure: true + - if: $CI_COMMIT_BRANCH =~ /^(release)$/ + # ~~~~~~~~~~~~~~~~~~~~~~~~ job_clean_gitlab_env: