Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
schnatterer opened this issue Jul 18, 2018 · 0 comments
Open

Comments

@schnatterer
Copy link
Member

schnatterer commented Jul 18, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant