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

Wait for sonarqube's quality gate #109

Merged
merged 4 commits into from
Dec 22, 2020

Conversation

kumbasar
Copy link
Contributor

@kumbasar kumbasar commented Dec 10, 2020

We have observed that the influxdb plugin doesn't always fetch the latest sonar measurements from the SonarQube server. So, in the current behavior, the plugin doesn't wait until a running Quality Gate task, which is triggered by the running Jenkins job, has been completed. It just gets the sonar measurements from the latest success (finished) task result. In short, we need to ensure that the influxdb plugin always fetches the results from the triggered pipeline, not from the previous successful one.

With this merge request, the plugin will wait until the triggered task has been completed.

An example screenshot:

image

Also, if the task status is not SUCCESS or the timeout has been expired, it'll log a Warning to the console.

@asimell
Copy link
Contributor

asimell commented Dec 10, 2020

@kumbasar Thanks for the PR. Could you resolve the spotbugs issues, so that the Jenkins checks pass?

EDIT: That was fast. 😁

@kumbasar
Copy link
Contributor Author

@kumbasar Thanks for the PR. Could you resolve the spotbugs issues, so that the Jenkins checks pass?

I am on it. I have already pushed the fix.

@kumbasar
Copy link
Contributor Author

Hey @asimell!

Are you fine the this PR? And is there anything else I can support you with, regarding this PR?

@asimell
Copy link
Contributor

asimell commented Dec 15, 2020

Hi @kumbasar . The PR looks good overall, but I haven't had time to test this and since there's no unit tests involved I need to test it a bit more carefully. I'm also having slight troubles making a job where I can test this, since my test jobs are so small the analysis doesn't take that long and I usually tend to wait for my quality gates before calling InfluxDbPublisher.

@kumbasar kumbasar marked this pull request as draft December 18, 2020 18:54
@kumbasar
Copy link
Contributor Author

Enhance console log:

image

@kumbasar kumbasar marked this pull request as ready for review December 18, 2020 19:50
@asimell asimell merged commit ed09d9f into jenkinsci:development Dec 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants