通过Jenkinsfile运行SonarQube分析时出错

时间:2019-06-17 11:02:43

标签: maven jenkins sonarqube devops

我正在尝试使用SonarQube为Maven项目运行静态分析,但是当我的jenkinsfile运行时,它抛出以下错误:

[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.0.1398:sonar (default-cli) on project agathe: Unable to load component class org.sonar.scanner.report.ActiveRulesPublisher: Unable to load component interface 
org.sonar.api.batch.rule.ActiveRules: 
Error 503 on https://sonarqube-otd-agathe.cnap-00-mp-prod.bmwgroup.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWtL-BD0q47oSHjJ0YCw&p=1&ps=500 : <html


[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[Pipeline] }
WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succedeed?
[Pipeline] // withSonarQubeEnv
[Pipeline] }

Jenkinsfile:

pipeline{
  agent {
    any {
      cloud 'openshift'
      label 'jagathespike'
      yamlFile 'jenkins/BuildPod.yaml'
    }
  }
  stages{
    stage('SonarQube Analysis') {
      steps{
        withSonarQubeEnv('otd-sonar') {
          sh 'mvn sonar:sonar'
        }
      }
      }
    }

有人可以帮助我解决这个问题吗?

0 个答案:

没有答案