ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • jenkins + sonarqube 연동
    IT 2021. 2. 4. 15:31

    안녕하세요

    최근에 jenkins + sonarqube 연동하고있어  공유합니다.


    sonaqube설치

     https://www.sonarqube.org/downloads/

     

    1. sonarqube install

     - wget https://sonarsource.bintray.com/Distribution/sonarqube/sonarqube-6.7.1.zip

     - unzip sonarqube-6.7.1.zip


    2. sonarqube scanner  install

     - wget https://sonarsource.bintray.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-3.0.3.778-linux.zip

     - unzip sonar-scanner-cli-3.0.3.778-linux.zip


    https://docs.sonarqube.org/display/SCAN/Analyzing+Source+Code


    sonarqube login token 생성




    sonarqube project 생성






    jenkins plugin install

     - jenkins관리->플로그인관리-> SonarQube Scanner for Jenkins

     - https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Jenkins


    jenkins setting

     - 환경설정

     

     - Global Tool Configuration


     - project build setting    (빌드)

     



    sonarqube project properties

     - sonar-project.properties

     source 폴더의 ROOT쪽에 위치하도록 합니다.

    sonar.projectKey=cms
    # this is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1.
    sonar.projectName=cms
    sonar.projectVersion=1.0

    # Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
    # Since SonarQube 4.2, this property is optional if sonar.modules is set.
    # If not set, SonarQube starts looking for source code from the directory containing
    # the sonar-project.properties file.
    sonar.sources=src/main/java, src/main/angular/src, common/src/main/java
    #sonar.exclusions=src/main/angular/node_modules/**,src/main/angular/e2e/**
    sonar.java.libraries=build/libs/*.jar
    sonar.java.binaries=build/classes

    # Encoding of the source code. Default is default system encoding
    #sonar.sourceEncoding=UTF-8


     

    --------결과------





    visualkhh@gmail.com


    댓글

Designed by Tistory.