-
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--------결과------
'IT' 카테고리의 다른 글
비트코인 자동 매도,매수 프로그램 (coinone) (0) 2021.02.04 groovy engine 사용시 memory out... (0) 2021.02.04 jenkins + slack 연동 (0) 2021.02.04 html canvas 온라인 멀티 뇌파 게임.(websocket) (0) 2021.02.04 타입스크립트(typescript) 베지어 곡선 만들기 Bezier Curves (0) 2021.02.04