Share sonar-project.properties across multiple projects

I have mutliple TypeScript projects which all basically use the same sonar properties except “projectKey”, “projectName” etc.

When I change something in the settings I have to change it in all projects, which takes a while and is annoying. So I want to share it somehow between the projects.

How can I achieve this?

Is it possible to extend other properties?
Or can I define multiple properties files when I execute the sonarqube-scanner?
Can I change the location of the properties file to a different location I share with other projects and overwrite the project-specific settings when calling sonarqube-scanner?
Do you have a different idea?

When nothing of it works my fallback plan is to don’t use the properties file at all but call the sonarqube-scanner directly with the settings which I then require from a shared module.

Hello @xxluke,
I’m having the same requirement but I’m very new to sonarqube and even don’t know how to perform
" call the sonarqube-scanner directly with the settings which I then require from a shared module.".

Please help me if you have resolve this .

For single git project I’m using below code .

node {
  stage('SCM') {
    git 'https://github.com/foo/bar.git'
  }
  stage('SonarQube analysis') {
    // requires SonarScanner 2.8+
    def scannerHome = tool 'SonarScanner 2.8';
    withSonarQubeEnv('My SonarQube Server') {
      sh "${scannerHome}/bin/sonar-scanner"
    }
  }
}

but I’ve more than one git repositories like below then how can I perform scanning for all of them in one jenkins job.

Job repositories like below :
But if I’ve more than one git repositories then how can I rearrange the above code.??
Please guide me I’m not able to get this since last 1 month.

Let say I’ve below git repositories:
1#https://github.com/rammady/awesome_project.git
2# https://github.com/rammady/maven-project.git
3# https://github.com/rammady/git-github.git
4# https://github.com/rammady/maven-project.git

Please help me.

Thanks & Regards
Ram