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

sonar-scanner with -Dsonar.qualitygate.wait=true support #130

Merged
merged 1 commit into from
Mar 1, 2022

Conversation

kumbasar
Copy link
Contributor

@kumbasar kumbasar commented Feb 17, 2022

sonar-scanner is not printing the ANALYSIS SUCCESSFUL, you can browse line in the build log if -Dsonar.qualitygate.wait flag is set to true. Therefore, the plugin skips the SonarQube data part. By default this flag is false. The plugin works fine if this flag is unset or set to false. Also, see #129

Solution:
Instead of parsing this above string pattern, we can use below line to parse the SonarQube URL if -Dsonar.qualitygate.wait=true :

QUALITY GATE STATUS: PASSED - View details on https://**************

Also, the plugin will skip the waitForQualityGateTask method if -Dsonar.qualitygate.wait=true.

Tests

  1. If -Dsonar.qualitygate.wait=true
    image

  2. If -Dsonar.qualitygate.wait=false
    image

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • [] Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@kumbasar
Copy link
Contributor Author

@asimell are you fine with these changes? Or did I miss something?

@asimell
Copy link
Contributor

asimell commented Feb 22, 2022

@kumbasar I haven't had time to review these changes yet. I've had a busy week and I will try to have a look at this still this week.

@asimell asimell added the bug label Mar 1, 2022
Copy link
Contributor

@asimell asimell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@asimell asimell merged commit 2668dcd into jenkinsci:development Mar 1, 2022
@kumbasar
Copy link
Contributor Author

kumbasar commented Mar 2, 2022

@asimell can you please give us a hint for the next release target?

@asimell
Copy link
Contributor

asimell commented Mar 2, 2022

@kumbasar Probably still this week. "Actual" work has kept me quite busy for a few weeks now. I can maybe squeeze it in today. The release creation doesn't actually really take that long, but I'm getting a bit paranoid with SonarQube generator changes, so I just want to test it well manually as well.

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

Successfully merging this pull request may close these issues.

2 participants