Reputation: 191
I managed to launch a SonarQube analysis of a git repository from a jenkins job and this in an automated local way. My jenkins is deployed on my port 8080 -> localhost: 8080 My Sonar is deployed on my port 9000 -> localhost: 9000
I now have to deploy it on a server where Jenkins is running but I do not know how to do it, I just managed to download the sonarQube plugin on the server Jenkins but about the rest, I do not know how to do it take.
Upvotes: 0
Views: 1288
Reputation: 6334
My jenkins is deployed on my port 8080 -> localhost: 8080 My Sonar is deployed on my port 9000 -> localhost: 9000... deploy it on a server where Jenkins is running
For production systems, consider installing SonarQube and a Jenkins build agent on separate systems. These services will content for resources at scale and increase build times.
It is helpful to understand the flow of information. These are the most common steps for triggering automated scans.
managed to download the sonarQube plugin on the server Jenkins
The main configuration will happen in the Jenkins Global Tool Configuration. Follow the instructions on this page to configure SonarQube Scanner and creating a job.
Simplified Steps
Configure Jenkins to point to your SonarQube server
Scroll down to the SonarQube Scanner configuration section and click on Add SonarQube Scanner. It is based on the typical Jenkins tool auto-installation. You can either choose to point to an already installed version of SonarQube Scanner (uncheck 'Install automatically') or tell Jenkins to grab the installer from a remote location (check 'Install automatically'):
Add the SonarQube Scanner build step to your build
Upvotes: 1