[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:
Cloners
is cloned by FOLIO-3172 Amend Jenkins Sonar config to use mai... Open
Relates
relates to FOLIO-2811 Rename default branch of all existing... Open
relates to FOLIO-2843 Create remote storage repository and... Closed
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: FOLIO-3172 Open

Detecting the default branch is not worth the effort because all FOLIO repositories are going to use "main" as the default branch ( FOLIO-2811 Open ). FOLIO will not support different default branch names.

Comment by David Crossley [ 26/May/21 ]

The tickets FOLIO-2851 Open FOLIO-3172 Open relate to just one situation.

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 FOLIO-2858 In Progress the FOLIO DevOps team will be handling the transition.

Generated at Thu Feb 08 23:23:42 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.