标签:follow tag lin repo name cap href scanner 引入
总结:jenkins pipline gradle配置:(需要修改build.gradle配置)
stage(‘SonarQube analysis‘) {
withSonarQubeEnv() {
sh ‘‘‘
cd mall-page/
/opt/software/gradle-4.8/bin/gradle sonarqube -Dsonar.projectName=MMD-mall-page
‘‘‘
}
}
builid.gradle修改如下:第一种需要引入本地包,第二种调用在线网上的包
Using the plugins DSL:
plugins {
id "org.sonarqube" version "2.7.1"
}
Using legacy plugin application:
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.7.1"
}
}
apply plugin: "org.sonarqube"
jenkins+gradle/maven+sonar+pipline
标签:follow tag lin repo name cap href scanner 引入
原文地址:https://blog.51cto.com/gravel/2437000