|
|
|
@@ -12,8 +12,14 @@ node { |
|
|
|
} |
|
|
|
// 代码静态检查 |
|
|
|
stage('code check') { |
|
|
|
steps { |
|
|
|
|
|
|
|
script { |
|
|
|
//引入Jenkins SonarQube-Scanner全局工具 "全局配置中以SonarQube-Scanner命名的工具" |
|
|
|
scannerHome = tool 'SonarQube-Scanner' |
|
|
|
} |
|
|
|
//引用SonarQube环境 "系统配置中配置的SonarQube servers的name值 " |
|
|
|
withSonarQubeEnv('sonar') { |
|
|
|
//执行sonar-scanner命令 |
|
|
|
sh "${scannerHome}/bin/sonar-scanner" |
|
|
|
} |
|
|
|
} |
|
|
|
// 编译并推送镜像仓库 |
|
|
|
|