Hi,
I have updated my Sonar with Developer Edition
But when I set sonar.branch.name and sonar.branch.target, sonar always give the below error
ERROR: Target branch does not exist on server: feature-ABC
Let's say I have 5 branches in my git repo. I don’t have "master" branch, but I have "develop". Due to some reason, I'm not considering "Develop" branch for the sonar analysis.
Scenario:
Now in other 4 branches, I have taken "feature-ABC" as Long-living branch, I have already created sonar analysis on this branch and project is available.
Another branch "feature-XYZ", I have performed analysis.
FYI, both branches having same source code to be analyzed.You can see , its showing "master" as branch name. I don’t know why.
Now, I added sonar.branch.name=" feature-XYZ " sonar.branch.target=" feature-ABC " in my Jenkinsfile and analyzed branch "feature-XYZ",
Now I'm getting below error:
INFO: Load settings for component 'testsonar1_feature-XYZ'
INFO: Load settings for component 'testsonar1_feature-XYZ' (done) | time=77ms
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 5.669s
INFO: Final Memory: 21M/235M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
ERROR: Target branch does not exist on server: feature-ABC