sonarqube configuration in jenkins

Post on 14-Feb-2017

37 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

SONARQUBE CONFIGURATION IN JENKINS

DevOps – Continuous Integration

Continuous Testing

Continuous Deployment

Continuous Monitoring

DevOps

Continuous Integration

Continuous Development

Continuous Feedback

INSTALL SONARQUBE IN CI SERVER

Download latest SonarQube from https://www.sonarqube.org/downloads and install in your CI server, or for Mac machines brew command can be used alternatively - brew update - brew install sonar ->

CONFIGURE & START THE SONARQUBE SERVERCreate sonar database in local server using database queries - CREATE DATABASE sonar_source; - CREATE USER 'sonar'@'localhost' IDENTIFIED BY 'sonar'; - GRANT ALL PRIVILEGES ON sonar_source.* TO 'sonar'@'localhost'; - FLUSH PRIVILEGES; -> Update database details in sonar properties file using command - $ vim /usr/local/Cellar/sonarqube/6.1/libexec/conf/ sonar.properties -> Start the sonar server using command - $ sonar console ->

CONFIGURE SONARQUBE IN JENKINS

Request certification from agent -># puppet agent --test --server=<master hostname> master.demo.com --waitforcert=50 -> check for certificate request in master -># puppet cert list -> sing certification in master -># puppert cert sign <agent hostname> agent.demo.com ->

CREATE SONARQUBE BUILD JOB IN JENKINS

Create a maven build job using option - new item -> Check ‘Prepare SonarQube Scanner environment’ under build Environment -> Update pom.xml url in ROOT POM -> Select ‘sonarQube analysis with maven’ under Post-build Actions ->

RUN THE SONARQUBE BUILD JOB & VIEW SONARQUBE REPORT IN JENKINS

Run the build -> Upon successful run, click ‘SonarQube’ icon to view SonarQube code analyzer report.

top related