When I am running sonarQube job in jenkins, it shows console output as in image. While downloading boot strap index, it shows an error as sonarQube server cannot be reached, but I am able to connect to that server from my local PC using that URL. Can anyone give me solution for this.
The above problem has resolved by doing two things
1) Installed java in sonarqube server that is accessible from jenkins
2) Installed right certificates
Related
I have configured sonarqube for one of my projects, but now i want to publish the sonarqube details in my jenkins dashboard. what could be the best possible way to do that?
I'm not sure that there is a straight forward way of getting "all" the data from sonar on to your Jenkins dashboard but can actually get a sonar badge and Quality gate info by using the Sonar plugin for Jenkins.
https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-jenkins/?q=cache:Tbhy8757pK4J:https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-jenkins/+&cd=1&hl=en&ct=clnk&gl=us
First of all, you need to deploy sonarqube on your local machine, ones it is done, then copy the URL of your sonarqube server, I am assuming, you have deployed sonarqube server on port 9090, once this done, log in to the sonarqube server and then create a project and then generate a token for that project:
Once these above configuration is done, just hit below maven command to generate sonarqube report on the sonarqube server:
mvn sonar:sonar -Dsonar.projectKey=[projectName] -Dsonar.host.url=http://localhost:9090 -Dsonar.login=[tokenId]
Below is the screenshot, this is how your reports on the sonarqube will looks like:
I use Jenkins for Continuous Integration, and I plan to add SonarQube to its tasks. I know it is possible to run SonarQube server and database remotely from the scanner, thanks to the documentation.
I tried to install sonarqube and sonarscanner plugins in Jenkins, setting up a slave connected to the server hosting sonarqube and sonarscanner, but Jenkins can't trigger a scan.
I also don't understand how Sonar would get the code ? Is Jenkins supposed to send it all to the server ?
Or do I have to manage the pulling from the repository on the server hosting Sonar ?
You're correct, the scanner must be on the build machine.
I am facing some issues in fetching Jenkins build data into influxDB. Actually, the main requirement is to show Jenkins job build results on Grafana dashboard. So, I have created a Jenkins freestyle job and also installed influxDB plugin(1.17) and then I executed Windows batch command (as I am using a Windows 7 machine). it throws nullpointerexception. Please let me know what i need to do.
Images are given below.
configure InfluxDB details
Configure job
Build Configure Job
Build Outputlog
I am trying to push my nuget package to artifactory. The commands to do that are embedded in my msbuild file. When I run the commands directly or through the msbuild file on my local machine / jenkins agent machine, I am able to push the package successfully.
But when the same msbuild file is executed using jenkins pipeline, even though the package get pushed to artifactory, I get the response as "Response status code does not indicate success: 403 (Forbidden)" and the hence the build fails.
Can anyone help here?
Seems a bit strange that you get a 403 and it works but it sounds like an issue with the effective user that the Jenkins job is running under. On Windows you can amend the user by changing it on the Jenkins windows service, I haven't used Jenkins on other OSs but the answer on
Run Jenkins jobs on Linux under a User have some pointers about doing the same for Linux.
Obviously in either case make sure your Jenkins user has necessary permissions to push to Artifactory.
I'm trying not (not hard enough it seems) to get our jenkins server to provision a jenkins-slave using docker.
I have installed the Docker-plugin and configured it according to the description on the page. I have also tested the connectivity and at least this part works.
I have also configured 1 label in the plugin and in my job. I even get a nice page showing me the connected jobs for this slave.
When I then try to start a build nothing really happens. A build is scheduled, but never started - (pending—Waiting for next available executor).
From the message it would seem like jenkins is not able to start the slave via docker....
I'm using docker 1.6.2 and the plugin is 0.10.1.
Any clue to what is going on would be much appreciated!
It seems the problem was that I had added the docker version in the plugin config. That is apparently a no-go according to this post