Code Monkey home page Code Monkey logo

sonarqube-with-cloud-narendra's Introduction

Deploy spring-boot-hello to sonarqube

Pre-requisites:

- Install Java
- Install Git
- Install Maven
- Install Jenkins
- Install sonarqube
- Install sonar-scanner

Install Java:

yum install java-1.8.0-openjdk-devel -y

Install Git:

yum install git -y

Install Apache-Maven:

wget https://mirrors.estointernet.in/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
tar xvzf apache-maven-3.6.3-bin.tar.gz

vi /etc/profile.d/maven.sh
--------------------------------------------
export MAVEN_HOME=/opt/apache-maven-3.6.3
export PATH=$PATH:$MAVEN_HOME/bin
--------------------------------------------

source /etc/profile.d/maven.sh
mvn -version

Install Jenkins

sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins.io/redhat-stable/jenkins.repo
sudo rpm --import http://pkg.jenkins.io/redhat-stable/jenkins.io.key
sudo yum install jenkins -y
service jenkins start

Sonarqube installation

Sonarqube installaton

Instll sonar-scanner

 cd /opt
 wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.4.0.2170-linux.zip
 unzip sonar-scanner-cli-4.4.0.2170-linux.zip
 cd sonar-scanner-4.4.0.2170-linux/conf/sonar-scanner.properties

image Give sonaeqube url inside of "sonar-scanner.properties" file

Integrate Sonarqube with jenkins

  1. Add sonarqube plugin

  2. Add SonarQube servers with in jenkins

    • Need to create authentication token with in Sonarqube server

      image

    • Need to create webhook with in Sonarqube server (use Jenkins server URL)

    image

    Click on My Account

    image

    Fill details and click on create

    image

    select security and give some name for token and then click on Generate

  3. Add SonarQube servers details with in "configure system"

image

Name: sonar-scanner Server URL: http://54.210.37.165:9000/ Server authentication token: (Create secret text with authentication token)

  1. Add SonarQube Scanner with in "Global Tool Configuration"

image

Create new pipeline job with jenkinsfile content and build

image

Click on "SonarQube" and check details

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.