创建部署问题时,请参考下面模板,你提供的信息越多,越容易及时获得解答。如果未按模板创建问题,管理员有权关闭问题。
确保帖子格式清晰易读,用 markdown code block 语法格式化代码块。
你只花一分钟创建的问题,不能指望别人花上半个小时给你解答。
操作系统信息
例如:虚拟机,Centos7.6,4C/8G
Kubernetes版本信息
1.22.10
容器运行时
20.10.8
KubeSphere版本信息
v3.3.0。离线安装 使用kk安装。
问题是什么
No plugin found for prefix ‘sonar’ in the current project and in the plugin groups [org. apar org-codehaus.mojo] available from the repositories [local (/path/to/local/repo), hy (http://10.10.2.218:8081/repository/hy-mvn-group/)]
Jenkinsfile内容如下:
stage(‘代码质量检查’){
agent none
steps{
withSonarQubeEnv('sonar'){
container('maven'){
sh '''
ls -l .
mvn sonar:sonar -Dsonar.projectKey=java-demo -Dsonar.host.url=http://10.10.2.221:31014 -Dsonar.login=f6f7g8d9s0d9f0fg89h8g9f8g9f8g89f
'''
}
}
}
}