mc1arke / sonarqube-community-branch-plugin

A plugin that allows branch analysis and pull request decoration in the Community version of Sonarqube
GNU Lesser General Public License v3.0
2.26k stars 526 forks source link

SonarQube edition does not support branch feature #983

Closed ivelchev closed 2 weeks ago

ivelchev commented 1 month ago

I have Community Edition SonarQube v10.7 setup. I have installed the Community Branch Plugin v1.22.0 and added the GH action to run analysis:

on:
  push:
    branches: ['*']

jobs:
  build:
    name: run-sonar-scan
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0  # Shallow clones should be disabled for a better relevancy of analysis
      - uses: sonarsource/sonarqube-scan-action@master
        env:
          SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
          SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
        with:
          args: >
            -Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
            -Dsonar.pullrequest.branch=${{ github.head_ref }}
            -Dsonar.pullrequest.base=${{ github.base_ref }}

This is my sonar-project.properties file:

sonar.projectKey=<my-project>
sonar.organization=<my-org>

# This is the name and version displayed in the SonarCloud UI.
sonar.projectName=<my-project-name>
#sonar.projectVersion=1.0

# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
#sonar.sources=.
sonar.tests=<my-tests-location>
sonar.exclusions=<my-exclusions>
# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8

However, I still get the error: {"errors":[{"msg":"Current edition does not support branch feature"}]}

Phoenix124 commented 1 month ago

@ivelchev check javaagent vars

      SONAR_WEB_JAVAADDITIONALOPTS: -javaagent:./extensions/plugins/sonarqube-community-branch-plugin-1.22.0.jar=web
      SONAR_CE_JAVAADDITIONALOPTS: -javaagent:./extensions/plugins/sonarqube-community-branch-plugin-1.22.0.jar=ce

working for me with 10.7

mc1arke commented 2 weeks ago

Closing since incomplete replication steps provided and no further response after community support