ces-build-lib icon indicating copy to clipboard operation
ces-build-lib copied to clipboard

SonarQube/Git: Branch Name works only in multi-branch pipelines

Open schnatterer opened this issue 6 years ago • 0 comments

env.BRANCH_NAME is only present in multi-branch pipeline builds, regular pipelines don't have information about branches.

Affected methods:

  • Git.getBranchName()
  • SonarQube.initMavenForRegularAnalysis()

We could use git rev-parse --abbrev-ref HEAD in Git class, instead. SonarQube could use Git class. Keeps everything DRY.

When fixed, update README.

schnatterer avatar Jul 18 '18 15:07 schnatterer