De-duplicate sonar job in the CI (#1238)

* De-duplicate sonar job in the CI

* Remove workaround for `src/*/kotlin` folders

* Downgrade the sonarqube plugin version

* Try increasing workers for this job, since it's quite slow

* Warn about regression in latest sonarqube release

* Forbid backups to prevent cryptographic issues
This commit is contained in:
Jorge Martin Espinosa
2023-09-07 13:19:13 +02:00
committed by GitHub
parent 29426a7fc7
commit b20d9f6973
7 changed files with 14 additions and 54 deletions

View File

@@ -52,12 +52,6 @@ jobs:
name: linting-report
path: |
*/build/reports/**/*.*
- name: 🔊 Publish results to Sonar
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
ORG_GRADLE_PROJECT_SONAR_LOGIN: ${{ secrets.SONAR_TOKEN }}
if: ${{ always() && env.SONAR_TOKEN != '' && env.ORG_GRADLE_PROJECT_SONAR_LOGIN != '' }}
run: ./gradlew sonar $CI_GRADLE_ARG_PROPERTIES
- name: Prepare Danger
if: always()
run: |

View File

@@ -1,4 +1,4 @@
name: Code Quality Checks
name: Sonar
on:
workflow_dispatch:
@@ -10,11 +10,11 @@ on:
# Enrich gradle.properties for CI/CD
env:
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx3072m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -XX:MaxMetaspaceSize=512m -Dkotlin.daemon.jvm.options="-Xmx2g" -Dkotlin.incremental=false
CI_GRADLE_ARG_PROPERTIES: --stacktrace -PpreDexEnable=false --max-workers 2 --no-daemon --warn
CI_GRADLE_ARG_PROPERTIES: --stacktrace -PpreDexEnable=false --max-workers 4 --no-daemon --warn
jobs:
sonar:
name: Project Check Suite
name: Sonar Quality Checks
runs-on: ubuntu-latest
# Allow all jobs on main and develop. Just one per PR.
concurrency:
@@ -41,9 +41,3 @@ jobs:
ORG_GRADLE_PROJECT_SONAR_LOGIN: ${{ secrets.SONAR_TOKEN }}
if: ${{ always() && env.SONAR_TOKEN != '' && env.ORG_GRADLE_PROJECT_SONAR_LOGIN != '' }}
run: ./gradlew sonar $CI_GRADLE_ARG_PROPERTIES
- name: Prepare Danger
if: always()
run: |
npm install --save-dev @babel/core
npm install --save-dev @babel/plugin-transform-flow-strip-types
yarn add danger-plugin-lint-report --dev