[FOLIO-2851] Amend Jenkins Sonar config to use default git branch rather than explicitly master Created: 23/Oct/20 Updated: 03/Jun/21 |
|
| Status: | Open |
| Project: | FOLIO |
| Components: | None |
| Affects versions: | None |
| Fix versions: | None |
| Type: | Bug | Priority: | TBD |
| Reporter: | David Crossley | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original estimate: | Not Specified | ||
| Issue links: |
|
||||||||||||||||||||
| Sprint: | |||||||||||||||||||||
| Development Team: | FOLIO DevOps | ||||||||||||||||||||
| Description |
|
See also the alternative solution that simply hard-codes the "main" branch: FOLIO-3172 The first new repository (ui-remote-storage) since the change by GitHub to have "main" branch as default rather than "master". The build of their main branch fails at the "Run Sonarqube" stage:
git fetch --no-tags \
https://github.com/folio-org/ui-remote-storage.git \
+refs/heads/master:refs/remotes/origin/master
fatal: couldn't find remote ref refs/heads/master
The jenkins-pipeline-libs vars/sonarqubeScanNPM.groovy and vars/sonarqubeMvn.groovy (This is part of the wider issue, as many Jenkins configurations explicitly use "master" for deciding whether the operation is for a feature branch or the mainline branch.) |
| Comments |
| Comment by Julian Ladisch [ 25/May/21 ] |
|
I disagree with this proposal. I prefer the alternative proposal that simply hard-codes the "main" branch:
Detecting the default branch is not worth the effort because all FOLIO repositories are going to use "main" as the default branch (
|
| Comment by David Crossley [ 26/May/21 ] |
|
The tickets
There are many situations of configuration and scripts in all of FOLIO infrastructure which explicitly refer to "master". Some will not be a simple replace. At
|