What are Github configuration file needed in root directory in order to run pull request analysis or commit on pull?

Hi Team
I am using sonarqube 8.7 enterprise version and scanner version SonarScanner 4.6.2.2472 and environment build we use jenkins

  1. I wanna do github integration I created app and followed the instruction the given by sonarQube documentation GitHub Integration | SonarQube Docs , But I am confuse about YAML files configuration under Basedir/.github/workflow or any other scanner needed in order to run this integration .
    Note : I am not using any automation tool for example maven etc , My project language php , CMS name is magento 2
    Can you provide the step which files mandatory needed in root dir for pull request analysis and configuration required in github ?
    Thanks in advance

Hello @Shashank_Gupta1
As you’re on SonarQube 8.7, I cannot help but advise you to upgrade to either the LTS or to latest as soon as possible, if this is not already planned and scheduled.

Jenkins automation
you mentioned that your standard CI is Jenkins, the natural path for your would be to head to the Jenkins documentation page.
And for your PHP project analysis, what you would need to store in your repository is a Jenkinsfile, examples are provided with the SonarScanner for Jenkins page.
Although many setups are possible, your easiest path for Jenkins/SonarQube/Github projects automation is the one documented with most details and includes:

  • the SonarScanner for Jenkins plugin
  • a Jenkins multi-branch pipeline
  • Jenkins github branch source plugin
  • the Jenkinsfile stored at the root folder of your repository

The SonarQube project onboarding UI (not sure if already there in 8.7) will help you with step-by-step instructions.

Github actions
Github actions support was only added to SonarQube 8.8, it may be an option for you, but only if you upgrade.
If you use the project onboarding UI, you’ll get the step by step instructions, including YAML content to use, about how to integrate your projects with github actions. You don’t need to worry about scanner installation if you use the recommended dockerized analysis for your PHP project.

Let me know if this helps
Sylvain