Skip to main content

Sonar and Sonar runner with Jenkins

Configure  Sonar and Sonar runner with Jenkins

1)Install sonar plugin in jenkins
2)Download sonarqube(http://www.sonarqube.org/downloads/) and unzip it  into C:\KB\sonar\sonarqube-4.1.2
3)Open sonar.properties file from conf folder and uncomment below properties

sonar.jdbc.username=sonar
sonar.jdbc.password=sonar
sonar.jdbc.url=jdbc:postgresql://localhost:5432/sonar

you will have to create sonar database

4))Open command prompt and type cd  C:\KB\sonar\sonarqube-4.1.2\bin\windows-x86-64

5) Run StartSonar.bat

6) Configure sonar through manage jenkins->configure system

7))Download sonar runner and unzip it intoC:\KB\sonar\sonar-runner-2.3
8)Open sonar-runner.bar file from bin folder.
add this line at start below set ERROR_CODE=0
set SONAR_RUNNER_HOME=C:\KB\sonar\sonar-runner-2.3
and replace existing set  PROJECT_HOME with set PROJECT_HOME=C:\Jenkins\jobs\\workspace\
9)Configure sonar through manage jenkins->configure system


10) Now open job configuration from jenkins for which you want to run sonar
 and in Add Build Step select Invoke Standalone Sonar Analysis


11)Save the configuration  and then run the build for job.

Comments

Popular posts from this blog

Salesforce - Common footer and sender email address for all emails from one department

if you are in situation where you are sending email out from salesforce and you want to use same  sender email address and footer.Lets say you are from customer service department and you department tag line is Best in service:) and you want to send email always from one email id bestineservice@mycompany.com for customer service department. Follow below steps- Common email footer(Organization wide email footer):- 1)login to salesforce 2)click on setup, in Admistration setup section click on Email footers then click on new on email footer screen. 3) enter all the details and click on same. Common Email address :-  1)click on setup 2) click on setup, in Admistration setup click on organization-wide address and then click on Add 3) fill the details and select the profile like customer service profile or depends on you situation and click on save  

Read PDF in Boomi

If you need to read pdf from Boomi Atom installation path,then use code something like this in map function. byte[] filebytes = new File('\\\\'+path+'\\'+filename+'.pdf').readBytes() String strEncoded= filebytes.encodeBase64().toString() name = filename+".pdf"; fileContent= strEncoded; fileContent stores the encoded base 64 data.

How To Kill Tomcat HTTP Stuck Thread

Stuck Thread Problem: In one of our application we were facing issue of stuck thread ,it can not complete current work and also not able to accept new work. Once thread is stuck,CPU utilization starts increasing slowly, as stucked thread is utilizing more CPU, other threads start performing slowly makes the environment slow for users  and at some point it brings your server down. Restarting server in business hours is not good for anyone ,and it creates the bad impression of IT department to business. Identify Stuck Threads: To identify which are stuck threads ,you can use jconsole and  topthreads plugin.once you identified the top http threads which are consuming more memory you can kill stuck threads using below solution. Stuck Thread Solution: so we have implemented below solution for stuck thread which we found on web. in java you can create jsp with below code and call jsp using URL something like this- http://servername:port/context/jspname.jsp?thr...