diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a7f52743f98cccd1c355fd7a5ea54c602a16924f..9d9ec6f74ee089ab96ea50038f4315cf5b8cd5ed 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,6 +2,7 @@ stages: - pre-build - test + - qualif - build - deploy-beta - deploy-staging @@ -59,7 +60,7 @@ build-loader-docker-image: allow_failure: true # TESTS -test-and-sonarqube: +test: # image: circleci/openjdk:11-jdk-browsers stage: test tags: @@ -80,20 +81,13 @@ test-and-sonarqube: # `max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]` command: ["bin/elasticsearch", "-Ediscovery.type=single-node"] variables: - # GRADLE_OPTS: "-Xms512m -Xmx8192m -XX:MaxMetaspaceSize=8192m -Dorg.gradle.daemon=false" - # 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 ES_JAVA_OPTS: "-Xms2g -Xmx2g" - # cache: - # key: "${CI_COMMIT_REF_NAME}" - # policy: pull-push - # paths: - # # - ".gradle" - # - .sonar/cache + cache: + key: "${CI_JOB_NAME}" + paths: + - .sonar/cache script: - # - ls -lshR /builds/urgi-is/faidare/.gradle/wrapper/dists/gradle-7.4.1-bin/58kw26xllvsiedyf3nujyarhn - - ./gradlew clean test - # jacocoTestReport -s sonarqube + - ./gradlew clean test artifacts: reports: junit: @@ -103,6 +97,24 @@ test-and-sonarqube: interruptible: true allow_failure: false +sonarqube-check: + tags: + - openstack + stage: qualif + image: gradle:jre11-slim + 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: ./gradlew sonar -x test + allow_failure: true + rules: + - if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + needs: ["test"] + # BUILD build: tags: