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

Bring back sonar build to jenkins file #312

Closed
wants to merge 1 commit into from

Conversation

azoitl
Copy link
Contributor

@azoitl azoitl commented Dec 12, 2023

@ptziegler in theory this should do it.

@ptziegler
Copy link
Contributor

I see that I'm not the only one suffering with the Jenkinsfile syntax :P

Copy link

github-actions bot commented Dec 12, 2023

Unit Test Results

     18 files       18 suites   29s ⏱️
   320 tests    318 ✔️   2 💤 0
1 920 runs  1 908 ✔️ 12 💤 0

Results for commit a3e7226.

♻️ This comment has been updated with latest results.

@azoitl
Copy link
Contributor Author

azoitl commented Dec 12, 2023

And as the jenkins build tells us we are not there yet. I asked fredrik if he has a tip for me.

@ptziegler
Copy link
Contributor

It looks like installationName is a mandatory argument of SonarQube Scanner.

But I think it can be chosen arbitrarily, so perhaps it's enough if you just set it as e.g. installationName: 'GEF Classic'?

@azoitl
Copy link
Contributor Author

azoitl commented Dec 13, 2023

Ah thx, changed that lets see.

@azoitl
Copy link
Contributor Author

azoitl commented Dec 13, 2023

We are a step further. Now we only need to fix how the secret is coming in. As I'm totally new to jenkins files and doing this trial and error based I would be happy for tips. if it helps I can provide a screenshot how it is done in a Jenkins ui setup.

Jenkinsfile Outdated Show resolved Hide resolved
@ptziegler
Copy link
Contributor

I'm pretty sure credentials expects the id, not the name.

image

@azoitl
Copy link
Contributor Author

azoitl commented Dec 13, 2023

In Jenkins ui I need both:
image

@ptziegler
Copy link
Contributor

In Jenkins ui I need both:

The Jenkins UI and the pipeline syntax can be a little weird sometimes :P
But I'm pretty sure the id is required here. Side note, don't store sensitive data in environment variables.

image

@azoitl
Copy link
Contributor Author

azoitl commented Dec 13, 2023

Thx for all the explanation. I'l gave it a try lets see!

@ptziegler
Copy link
Contributor

Thx for all the explanation. I'l gave it a try lets see!

Believe me, I've been there. 😅 Trying to figure out how anything works on Jenkins is always a real treat...

@ptziegler
Copy link
Contributor

I think I completely misunderstood the purpose of the installationName field.

SonarQube installation defined in this job (GEF Classic) does not match any configured installation

Obviously, the error message doesn't show which installations are available...

@ptziegler
Copy link
Contributor

@azoitl Can you access https://ci.eclipse.org/gef/configureTools? There should normally be an entry of the installed SonarQube Scanner instance.

@ptziegler
Copy link
Contributor

Just grasping at straws here, but the other job includes something like "GEF_Classic_SonarQube.io". Can you try out that one as installation?

@ptziegler
Copy link
Contributor

ptziegler commented Dec 13, 2023

And if that doesn't work, perhaps simply "SonarCloud.io"...

Injecting SonarQube environment variables using the configuration: SonarCloud.io

@azoitl azoitl force-pushed the sonar branch 2 times, most recently from 16c6e53 to 4ce353f Compare December 13, 2023 18:02
@ptziegler
Copy link
Contributor

And now I'm out of ideas :(
I'm afraid the name is something the IT guys have to look up for us.

@azoitl
Copy link
Contributor Author

azoitl commented Dec 13, 2023

@azoitl Can you access https://ci.eclipse.org/gef/configureTools? There should normally be an entry of the installed SonarQube Scanner instance.

Unfortunately not. I tried now: GEF_Classic_SonarQube.io, SonarCloud.io, My SonarQube Server will ask in Eclipse helpdesk. Keep you updated.

@ptziegler
Copy link
Contributor

On the bright side, this seems to be the final hurdle. I already consider the fact that the other job works a small victory 😄

@azoitl
Copy link
Contributor Author

azoitl commented Dec 13, 2023

@ptziegler @fredg02 was so kind and provided a patch fixing our problem in PR #318. So finally we have sonar analysis running.

@azoitl azoitl closed this Dec 13, 2023
@azoitl azoitl deleted the sonar branch December 17, 2023 18:00
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

Successfully merging this pull request may close these issues.

2 participants