New project sonar

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
  • what are you trying to achieve
  • what have you tried so far to achieve this

Good afternoon! I have a question, I have a sonar project running perfectly, with each new project I need to include the project in the SonarQubeAnalysisConfig.xml file? Is there any way that this will become standard?

for example, I add a new token to the file ?, can I duplicate users

<! -
http: // localhost: 9000

562175ec16c77f58de81c9d856434e16cfd81b4e

->

???

alguém saberia me ajudar?

Hi,

I think probably no one responded because it’s not clear what the question/problem is.

 
Ann

Ann, I’m sorry …
When you create a project, we set the onarQubeAnalysisConfig.xml file or the token played on sonar so that it can be recognized, would you like to know if this is some automation, or if all new projects are defined as new tokens? Could you explain me?

Hi,

As far as I can tell, you’re asking whether you need to generate a new user token for the analysis of each, individual project. The answer to that should be ‘no’. Ideally, you’ll have a technical user with analysis rights on every project. You generate one token for this user, configure it on the CI side and use it for all projects.

 
HTH,
Ann

Sorry, could not understand, criteria how to help me? Could you send me pictures if it were possible?
My idea would be for each user who has a different project, which may even be linked to the same user, but which different projects and that comes to my difficulty, how to generate projects, without placing the token in the .xml file.

Hi,

I don’t know what xml file you’re talking about.

 
Ann

the token does not need to be configured inside the file in the sonar scanner:
File Name: sonar-scanner-msbuild-4.6.2.2108-netcoreapp2.0 and filename: SonarQube.Analysis.xml - this file is used to place the token that is used in sonar, isn’t it? as the image below

Okay, I’m going to go back to what I said earlier:

You’ll configured the analysis token from that one, technical user in your XML file (un-commented, BTW. Your screenshot shows it commented-out) and use that for all analyses. If you really want to create a token per project, then leave it out of the .xml file, and include it instead on the analysis command line.

 
HTH,
Ann

sorry, I did not understand very well … for example, for each project created is created this initial configuration, as follows an image below:

My question is for each project, with new users, will I need to make this new configuration with different tokens?
how could it do it in an automated way? Has as ?

Hi,

I’m not sure how else to say it. Can you tell me specifically what parts of my previous response are unclear?

No. Create one “Robot” user with analysis permissions to everything.

Configure the token you generate for the “Robot” in your XML file.

 
Ann