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

Extra property in nx run for sonar.newBranch.referenceBranch=master doesnt work #115

Open
2 tasks
frantisekdolsky opened this issue Sep 11, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@frantisekdolsky
Copy link

frantisekdolsky commented Sep 11, 2024

If possible, please provide a reproduction repository you discovered this bug in.

No response

Which area/package is the issue in?

@koliveira15/nx-sonarqube

Description

First of all, I'm not really sure if I configure my github workflow properly. All works except providing extra option in nx run command (rather than in project.json). When I run following command:
npx nx run myapp:sonar --sonar.newCode.referenceBranch=master --parallel=1 --branch="${{ github.ref_name }}"

I also tried:
npx nx run myapp:sonar --parallel=1 --extra='{"sonar.newCode.referenceBranch": "master"}' --branch="${{ github.ref_name }}" - same result.

analysis is successful, but the new code definition is still in SonarQube for that specific branch marked as "project setting`. Do I provide wrong extra parameter? If yes, how can I override it? I wanna provide this extra option in nx command rather than in project.json, because it will differ for various branches.

To clarify why using cli rather than project.json for this specific property, we need to assign different newCode branch for various scenarios. For example for feature branch we refer to master, for release branch we refer to previous release branch, for master we release for latest release branch.

If applicable, please provide the Nx report

No response

Please provide the exception or error you saw

No response

Other information

No response

I would be willing to submit a PR to fix this issue

  • Yes
  • No
@frantisekdolsky frantisekdolsky added the bug Something isn't working label Sep 11, 2024
@frantisekdolsky
Copy link
Author

Using that property in project.json works fine. When specifying that property in project.json as well as in nx run command, seems its overriden, but not correctly, so its not using master as reference branch but rather project setting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant