yudong
####修改后配置

####日志信息

现在这样得话 第一个阶段就不能过去了

    1934801322 这个格式还是没有改,在手动编辑下 jenkinsfile ,修改我上面截图的那一段;

      yudong

      大佬 我这样修改后 就找不到文件呢

      ####配置信息

      ####报错信息

        1934801322 哦,这个文件可以不用,这个 mvn 命令还用你之前的;只不过格式改下:

                        container('maven') {
                            withCredentials([string(credentialsId: "sonar", variable: 'SONAR_TOKEN')]) {
                                withSonarQubeEnv('sonar') {
                                    sh '''mvn sonar:sonar -Dsonar.login=$SONAR_TOKEN'''
                                }
                            }
                            timeout(time: 1, unit: 'HOURS') {
                                waitForQualityGate abortPipeline: true
                            }
                        }

          yudong
          ####报错信息

          ####配置信息

          stage('Code Analysis') {
          
            agent none
          
            steps {
          
              container('maven') {
          
                withCredentials([string(credentialsId : 'sonar' ,variable : 'SONAR_TOKEN' ,)]) {
          
                  withSonarQubeEnv('sonar') {
          
                    sh '''mvn  sonar:sonar  -Dsonar.login=$SONAR_TOKEN 

          '''

                    timeout(time: 1, unit: 'HOURS') {
          
                      waitForQualityGate abortPipeline: 'true'
          
                    }
          
                  }
          
                }
          
              }
          
            }
          
          }

          ####目前就是一直卡在 这个报错

          No previous SonarQube analysis found on this pipeline execution. Please use the ‘withSonarQubeEnv’ wrapper to run your analysis.

            yudong 非常感谢 大佬的帮助 总结一下 这个问题的原因 希望如果新来的小伙伴,遇到这个问题。可以先排查一下 Sonarqube 构建的过程 步骤 进行排查 

            5 个月 后