GithubHelp home page GithubHelp logo

Comments (8)

tstackhouse avatar tstackhouse commented on June 10, 2024 1

Opened PR #21 to omit the param if the option is false or unset.

from nx-sonarqube.

koliveira15 avatar koliveira15 commented on June 10, 2024 1

@tstackhouse your PR has been published under version 2.1.1

from nx-sonarqube.

tstackhouse avatar tstackhouse commented on June 10, 2024 1

Sweet! Thank you for pulling in my change. I’ll give it a try on Monday :)

from nx-sonarqube.

tstackhouse avatar tstackhouse commented on June 10, 2024 1

Just to follow up, I pulled in the update and it worked like a charm :D The PR detection is now working perfectly in GitHub CI. Thanks again!

from nx-sonarqube.

ak274 avatar ak274 commented on June 10, 2024

Following might help to understand why its not working in Gitlab CICD.
https://gitlab.com/gitlab-org/gitlab-runner/-/issues/4557

from nx-sonarqube.

koliveira15 avatar koliveira15 commented on June 10, 2024

@ak274 seems like the issue is specific to Gitlab runner. Handling every type of CI environment is not in scope for the plugin. I would be open to changing the branches parameter to branch. That way consumers can pass in their own branch name, respective of their CI environment.

from nx-sonarqube.

ak274 avatar ak274 commented on June 10, 2024

I have observed that if you remove sonar.branch.name param from the scanner function altogether.. the GitLab CI automatically detect branch name and pull requests.

from nx-sonarqube.

tstackhouse avatar tstackhouse commented on June 10, 2024

This behaviour also happens in GitHub's CI/CD pipelines. Running with branches: false the scanner tries to autoconfigure, but fails because sonar.branch.name is still passed, even though the value is '', resulting in the following:

...
INFO: Load project branches
INFO: Load project branches (done) | time=108ms
INFO: Load project pull requests
INFO: Load project pull requests (done) | time=113ms
INFO: Load branch configuration
INFO: Detected branch/PR in 'GitHub Action'
INFO: Auto-configuring pull request '####'
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 15.413s
ERROR: Error during SonarScanner execution
ERROR: A pull request analysis cannot have the branch analysis parameter 'sonar.branch.name'
ERROR: 
INFO: Final Memory: 6M/24M
INFO: ------------------------------------------------------------------------

from nx-sonarqube.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.