| name: Fineract Sonarqube |
| on: |
| workflow_call: |
| permissions: |
| contents: read |
| jobs: |
| build: |
| if: ${{ github.event_name == 'push' && github.ref_name == 'develop' }} |
| runs-on: ubuntu-24.04 |
| timeout-minutes: 60 |
| env: |
| TZ: Asia/Kolkata |
| SONAR_ORGANIZATION: ${{ secrets.SONAR_ORGANIZATION }} |
| SONAR_PROJECT_KEY: ${{ secrets.SONAR_PROJECT_KEY }} |
| SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }} |
| DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} |
| JAVA_BINARIES: . |
| steps: |
| - name: Set up JDK 21 |
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5 |
| with: |
| java-version: '21' |
| distribution: 'zulu' |
| - name: Download workspace |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 |
| with: |
| name: fineract-workspace-${{ github.run_id }} |
| path: . |
| - name: Extract workspace |
| run: tar -xf fineract-workspace.tar |
| - name: Setup Gradle and Validate Wrapper |
| uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2 |
| with: |
| validate-wrappers: true |
| - name: Sonar |
| run: ./gradlew --no-daemon --console=plain -Dsonar.verbose=true -Dsonar.token=$SONAR_TOKEN -Dsonar.host.url=$SONAR_HOST_URL -Dsonar.organization=$SONAR_ORGANIZATION -Dsonar.projectKey=$SONAR_PROJECT_KEY -Dsonar.java.binaries=$JAVA_BINARIES --info --stacktrace sonar -x buildJavaSdk |