pipeline { agent any stages { stage('Checkout') { steps { // 检出代码并指定分支 git credentialsId: '1', url: 'http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git', branch: 'main' } } stage('SonarQube Analysis') { steps { // 使用SonarScanner执行代码分析 sh 'mvn clean verify sonar:sonar -Dsonar.projectKey=test-cf-server -Dsonar.host.url=http://192.168.1.205:9000 -Dsonar.login=519c6ab9af828810bdacd86bd22550fafbc93298' } } } }