- which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension):
Sonarqube: 7.2.1
Sonarscanner 3.2
- what are you trying to achieve
I am trying to understand how the branching model works as defined by Sonarqube: https://docs.sonarqube.org/pages/viewpage.action?pageId=11640256
Looking at the diagram, it is advocating Git merges from short live branch into a long live development branch. However, over my end, we reduce the number Sonarqube scan by advocate fast-forward merging only branching model. This means that we dont need to do duplicated scan on our long live branch as it new changes on development branch need to be merged into feature branch before pull request can be merged back to development branch. The leak period will be updated to tip of long live branch upon PR approval.
So my question is is it possible for scan results from feature branch merged into long live branch without the need of invoking another Sonarqube scan? such as API call?
E.g.
-
master branch commit id is ABC,
-
feature branch branched out from master branch and changes made, commit id is DEF.
-
Sonarqube scans the feature branch commit id DEF.
-
On sonarqube server dashboard, it should show results for each branch.
-
Upon pull request approval, it triggers a pipeline, now the dashboard shows master(main branch) as DEF without invoking another scan.
-
what have you tried so far to achieve this
I sawsonar.branch.target
but i dont know how does this property come into play.