Open SeregaANT opened 6 years ago
Hi
Hi! What I set up wrong? Why commit not send to GitLab ?
Have you full log with debug please ?
`[Pipeline] // stage [Pipeline] withEnv [Pipeline] { [Pipeline] withCredentials [Pipeline] { [Pipeline] gitlabBuilds [Pipeline] { [Pipeline] stage [Pipeline] { (Статический анализ кода) [Pipeline] timestamps [Pipeline] { [Pipeline] script [Pipeline] { [Pipeline] tool [Pipeline] readFile [Pipeline] } [Pipeline] // script [Pipeline] withSonarQubeEnv Injecting SonarQube environment variables using the configuration: SonarServer [Pipeline] { [Pipeline] catchError [Pipeline] { [Pipeline] isUnix [Pipeline] bat [RNG] Running batch script
C:\jen\workspace\RNG>chcp 65001 1>nul
C:\jen\workspace\RNG>C:\sonar-scanner\bin\sonar-scanner -Dsonar.projectVersion=1.1.10 -Dsonar.gitlab.project_id=36 -Dsonar.gitlab.commit_sha=65f32a6065b8c28a6b175d9f3e7f9908b2d8b542 -Dsonar.gitlab.ref_name=origin/master INFO: Scanner configuration file: C:\sonar-scanner\bin..\conf\sonar-scanner.properties INFO: Project root configuration file: C:\jen\workspace\RNG\sonar-project.properties 13:11:34.012 INFO: SonarQube Scanner 3.2.0.1227 13:11:34.014 INFO: Java 1.8.0_121 Oracle Corporation (64-bit) 13:11:34.014 INFO: Windows NT (unknown) 10.0 amd64 13:11:34.023 INFO: SONAR_SCANNER_OPTS=-XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Xmx4g 13:11:34.380 DEBUG: keyStore is : 13:11:34.380 DEBUG: keyStore type is : jks 13:11:34.380 DEBUG: keyStore provider is : 13:11:34.381 DEBUG: init keystore 13:11:34.381 DEBUG: init keymanager of type SunX509 13:11:34.612 DEBUG: Create: C:\Users**.WIN-0DU918BNCQG.sonar\cache 13:11:34.613 INFO: User cache: C:\Users**.WIN-0DU918BNCQG.sonar\cache 13:11:34.613 DEBUG: Create: C:\Users**.WIN-0DU918BNCQG.sonar\cache_tmp 13:11:34.617 DEBUG: Extract sonar-scanner-api-batch in temp... 13:11:34.716 DEBUG: Get bootstrap index... 13:11:34.716 DEBUG: Download: http://192.168.36.48:9000/batch/index 13:11:34.795 DEBUG: Get bootstrap completed 13:11:34.825 DEBUG: Create isolated classloader... 13:11:34.839 DEBUG: Start temp cleaning... 13:11:34.847 DEBUG: Temp cleaning done 13:11:34.847 DEBUG: Execution getVersion 13:11:34.852 INFO: SonarQube server 7.3.0 13:11:34.852 INFO: Default locale: "ru_RU", source code encoding: "UTF-8" 13:11:34.853 DEBUG: Work directory: C:\jen\workspace\RNG.scannerwork 13:11:34.855 DEBUG: Execution execute 13:11:35.139 INFO: Publish mode 13:11:35.346 INFO: Load global settings 13:11:35.410 DEBUG: GET 200 http://192.168.36.48:9000/api/settings/values.protobuf | time=52ms 13:11:35.541 INFO: Load global settings (done) | time=196ms 13:11:35.561 INFO: Server id: 079D80A9-AWXHnRugTy1eu9Sc4yaB 13:11:35.584 INFO: User cache: C:\Users***.WIN-0DU918BNCQG.sonar\cache 13:11:35.905 INFO: Load/download plugins 13:11:35.905 INFO: Load plugins index 13:11:35.915 DEBUG: GET 200 http://192.168.36.48:9000/api/plugins/installed | time=10ms 13:11:35.967 INFO: Load plugins index (done) | time=62ms 13:11:36.167 INFO: Load/download plugins (done) | time=262ms 13:11:36.262 DEBUG: Plugins: 13:11:36.262 DEBUG: SonarPython 1.10.0.2131 (python) 13:11:36.263 DEBUG: SonarCSS 1.0.1.508 (cssfamily) 13:11:36.263 DEBUG: SonarGo 1.1.0.1612 (go) 13:11:36.263 DEBUG: SonarKotlin 1.0.1.965 (kotlin) 13:11:36.263 DEBUG: Svn 1.8.0.1168 (scmsvn) 13:11:36.263 DEBUG: SonarJS 4.2.1.6529 (javascript) 13:11:36.263 DEBUG: SonarC# 7.5.0.6605 (csharp) 13:11:36.263 DEBUG: Russian Pack 1.9 (l10nru) 13:11:36.264 DEBUG: SonarJava 5.7.0.15470 (java) 13:11:36.264 DEBUG: LDAP 2.2.0.608 (ldap) 13:11:36.264 DEBUG: Git 1.4.1.1128 (scmgit) 13:11:36.264 DEBUG: SonarFlex 2.4.0.1222 (flex) 13:11:36.264 DEBUG: SonarXML 1.5.1.1452 (xml) 13:11:36.264 DEBUG: SonarPHP 2.14.0.3569 (php) 13:11:36.264 DEBUG: 1C (BSL) 1.11 (bsl) 13:11:36.264 DEBUG: GitLab 4.0.0 (gitlab) 13:11:36.265 DEBUG: SonarTS 1.7.0.2893 (typescript) 13:11:36.265 DEBUG: Cucumber Gherkin 1.7 (gherkin) 13:11:36.285 INFO: Loaded core extensions: 13:11:37.771 INFO: Process project properties 13:11:37.782 DEBUG: Process project properties (done) | time=11ms 13:11:37.818 INFO: Load project repositories 13:11:37.841 DEBUG: GET 200 http://192.168.36.48:9000/batch/project.protobuf?key=RNG%3Amaster | time=22ms 13:11:37.868 INFO: Load project repositories (done) | time=50ms 13:11:37.983 DEBUG: Available languages: 13:11:37.984 DEBUG: Python => "py" 13:11:37.984 DEBUG: CSS => "css" 13:11:37.984 DEBUG: Go => "go" 13:11:37.984 DEBUG: Kotlin => "kotlin" 13:11:37.984 DEBUG: JavaScript => "js" 13:11:37.985 DEBUG: C# => "cs" 13:11:37.985 DEBUG: Java => "java" 13:11:37.985 DEBUG: Flex => "flex" 13:11:37.985 DEBUG: XML => "xml" 13:11:37.985 DEBUG: PHP => "php" 13:11:37.985 DEBUG: 1C (BSL) => "bsl" 13:11:37.985 DEBUG: TypeScript => "ts" 13:11:37.985 DEBUG: Cucumber Gherkin => "gherkin" 13:11:38.001 INFO: Load quality profiles 13:11:38.034 DEBUG: GET 200 http://192.168.36.48:9000/api/qualityprofiles/search.protobuf?projectKey=RNG%3Amaster | time=31ms 13:11:38.046 INFO: Load quality profiles (done) | time=45ms 13:11:38.076 INFO: Load active rules 13:11:38.095 DEBUG: GET 200 http://192.168.36.48:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWXHnbx3Ty1eu9Sc4znM&p=1&ps=500 | time=18ms 13:11:38.157 DEBUG: GET 200 http://192.168.36.48:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWXHnb66Ty1eu9Sc4zo7&p=1&ps=500 | time=15ms 13:11:38.177 DEBUG: GET 200 http://192.168.36.48:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWXHnb2wTy1eu9Sc4zoB&p=1&ps=500 | time=15ms 13:11:38.203 DEBUG: GET 200 http://192.168.36.48:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWXHncF5Ty1eu9Sc4zus&p=1&ps=500 | time=21ms 13:11:38.230 DEBUG: GET 200 http://192.168.36.48:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWXHncKxTy1eu9Sc4zwk&p=1&ps=500 | time=16ms 13:11:38.280 DEBUG: GET 200 http://192.168.36.48:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWXHncPqTy1eu9Sc4z0e&p=1&ps=500 | time=45ms 13:11:38.361 DEBUG: GET 200 http://192.168.36.48:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWXHncY7Ty1eu9Sc4z9I&p=1&ps=500 | time=59ms 13:11:38.412 DEBUG: GET 200 http://192.168.36.48:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWXHncgvTy1eu9Sc40DI&p=1&ps=500 | time=18ms 13:11:38.428 DEBUG: GET 200 http://192.168.36.48:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWXHncmmTy1eu9Sc40D5&p=1&ps=500 | time=11ms 13:11:38.452 DEBUG: GET 200 http://192.168.36.48:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWXHndFnTy1eu9Sc40Gn&p=1&ps=500 | time=22ms 13:11:38.471 DEBUG: GET 200 http://192.168.36.48:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWXM8B_oxtLNf--Fd7De&p=1&ps=500 | time=13ms 13:11:38.488 DEBUG: GET 200 http://192.168.36.48:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWXHndSjTy1eu9Sc40OK&p=1&ps=500 | time=16ms 13:11:38.512 DEBUG: GET 200 http://192.168.36.48:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWXHndXcTy1eu9Sc40Pk&p=1&ps=500 | time=19ms 13:11:38.534 INFO: Load active rules (done) | time=458ms 13:11:38.539 INFO: Load metrics repository 13:11:38.550 DEBUG: GET 200 http://192.168.36.48:9000/api/metrics/search?f=name,description,direction,qualitative,custom&ps=500&p=1 | time=11ms 13:11:38.568 INFO: Load metrics repository (done) | time=28ms 13:11:38.618 INFO: Project key: RNG 13:11:38.618 INFO: Project base dir: C:\jen\workspace\RNG 13:11:38.618 INFO: Branch key: master 13:11:38.619 WARN: The use of "sonar.branch" is deprecated and replaced by "sonar.branch.name". See https://redirect.sonarsource.com/doc/branches.html. 13:11:38.621 DEBUG: Start recursive analysis of project modules 13:11:38.622 INFO: ------------- Scan RNG 13:11:40.021 INFO: Base dir: C:\jen\workspace\RNG 13:11:40.021 INFO: Working dir: C:\jen\workspace\RNG.scannerwork 13:11:40.023 INFO: Source paths: src/cf 13:11:40.024 INFO: Source encoding: UTF-8, default locale: ru_RU 13:11:40.033 INFO: Load server rules 13:11:40.180 DEBUG: GET 200 http://192.168.36.48:9000/api/rules/list.protobuf | time=147ms 13:11:40.210 INFO: Load server rules (done) | time=178ms 13:11:40.395 DEBUG: Declared extensions of language Python were converted to sonar.lang.patterns.py : /*.py 13:11:40.396 DEBUG: Declared extensions of language CSS were converted to sonar.lang.patterns.css : /*.css,*/.less,/*.scss 13:11:40.396 DEBUG: Declared extensions of language Go were converted to sonar.lang.patterns.go : /*.go 13:11:40.396 DEBUG: Declared extensions of language Kotlin were converted to sonar.lang.patterns.kotlin : */.kt 13:11:40.396 DEBUG: Declared extensions of language JavaScript were converted to sonar.lang.patterns.js : /*.js,/*.jsx,*/.vue 13:11:40.396 DEBUG: Declared extensions of language C# were converted to sonar.lang.patterns.cs : /*.cs 13:11:40.397 DEBUG: Declared extensions of language Java were converted to sonar.lang.patterns.java : /*.java,*/.jav 13:11:40.397 DEBUG: Declared extensions of language Flex were converted to sonar.lang.patterns.flex : /*.as 13:11:40.397 DEBUG: Declared extensions of language XML were converted to sonar.lang.patterns.xml : /*.xml,*/.xsd,/*.xsl 13:11:40.397 DEBUG: Declared extensions of language PHP were converted to sonar.lang.patterns.php : /*.php,*/.php3,/*.php4,/*.php5,*/.phtml,/*.inc 13:11:40.398 DEBUG: Declared extensions of language 1C (BSL) were converted to sonar.lang.patterns.bsl : /*.bsl,*/.os,/*.l1c 13:11:40.398 DEBUG: Declared extensions of language TypeScript were converted to sonar.lang.patterns.ts : /*.ts,*/.tsx 13:11:40.398 DEBUG: Declared extensions of language Cucumber Gherkin were converted to sonar.lang.patterns.gherkin : /*.feature 13:11:40.413 INFO: Index files 13:11:40.417 INFO: Included sources: 13:11:40.417 INFO: /*.l1c 13:11:40.417 INFO: Excluded sources: 13:11:40.417 INFO: */.xml 13:11:40.417 INFO: /*.html 13:11:40.418 INFO: */.mdo 13:11:48.725 DEBUG: 'src\cf\TestModule.l1c' indexed with language 'bsl' 13:11:48.735 INFO: 1 file indexed 13:11:48.736 INFO: 15207 files ignored because of inclusion/exclusion patterns 13:11:48.737 INFO: Quality profile for bsl: Simple Test Security 13:11:50.224 DEBUG: 'JavaSquidSensor' skipped because there is no related file in current project 13:11:50.226 DEBUG: 'Generic Coverage Report' skipped because one of the required properties is missing 13:11:50.227 DEBUG: 'Generic Test Executions Report' skipped because one of the required properties is missing 13:11:50.227 DEBUG: 'Import external issues report' skipped because one of the required properties is missing 13:11:50.228 DEBUG: 'Python Squid Sensor' skipped because there is no related file in current project 13:11:50.228 DEBUG: 'PylintSensor' skipped because there is no related file in current project 13:11:50.229 DEBUG: 'PylintImportSensor' skipped because there is no related file in current project 13:11:50.230 DEBUG: 'PythonXUnitSensor' skipped because there is no related file in current project 13:11:50.230 DEBUG: 'SonarCSS Metrics' skipped because there is no related file in current project 13:11:50.230 DEBUG: 'SonarCSS Rules' skipped because there is no related file in current project 13:11:50.231 DEBUG: 'Import of stylelint issues' skipped because there is no related file in current project 13:11:50.231 DEBUG: 'SonarGo' skipped because there is no related file in current project 13:11:50.232 DEBUG: 'Go Unit Test Report' skipped because there is no related file in current project 13:11:50.233 DEBUG: 'Import of go vet issues' skipped because there is no related file in current project 13:11:50.234 DEBUG: 'Import of Golint issues' skipped because there is no related file in current project 13:11:50.234 DEBUG: 'Import of GoMetaLinter issues' skipped because there is no related file in current project 13:11:50.234 DEBUG: 'Kotlin Sensor' skipped because there is no related file in current project 13:11:50.235 DEBUG: 'Import of detekt issues' skipped because there is no related file in current project 13:11:50.236 DEBUG: 'Import of Android Lint issues' skipped because one of the required properties is missing 13:11:50.236 DEBUG: 'SonarJS' skipped because there is no related file in current project 13:11:50.237 DEBUG: 'SonarJS Coverage' skipped because there is no related file in current project 13:11:50.238 DEBUG: 'Import of ESLint issues' skipped because one of the required properties is missing 13:11:50.238 DEBUG: 'C# Properties' skipped because there is no related file in current project 13:11:50.240 DEBUG: 'Import of Checkstyle issues' skipped because there is no related file in current project 13:11:50.240 DEBUG: 'Import of PMD issues' skipped because one of the required properties is missing 13:11:50.241 DEBUG: 'Import of SpotBugs issues' skipped because there is no related file in current project 13:11:50.241 DEBUG: 'SurefireSensor' skipped because there is no related file in current project 13:11:50.241 DEBUG: 'JaCoCoSensor' skipped because there is no related file in current project 13:11:50.242 DEBUG: 'Flex' skipped because there is no related file in current project 13:11:50.242 DEBUG: 'Flex Cobertura' skipped because there is no related file in current project 13:11:50.242 DEBUG: 'XML Sensor' skipped because there is no related file in current project 13:11:50.242 DEBUG: 'PHP sensor' skipped because there is no related file in current project 13:11:50.243 DEBUG: 'Analyzer for "php.ini" files' skipped because there is no related file in current project 13:11:50.244 DEBUG: 'Import of TSLint issues' skipped because there is no related file in current project 13:11:50.244 DEBUG: 'Import of ESLint issues' skipped because there is no related file in current project 13:11:50.244 DEBUG: 'SonarTS' skipped because there is no related file in current project 13:11:50.244 DEBUG: 'SonarTS Coverage' skipped because there is no related file in current project 13:11:50.245 DEBUG: 'Gherkin Squid Sensor' skipped because there is no related file in current project 13:11:50.250 DEBUG: 'C#' skipped because there is no related file in current project 13:11:50.251 DEBUG: 'C# Tests Coverage Report Import' skipped because there is no related file in current project 13:11:50.251 DEBUG: '[Deprecated] C# Integration Tests Coverage Report Import' skipped because there is no related file in current project 13:11:50.251 DEBUG: 'C# Unit Test Results Import' skipped because there is no related file in current project 13:11:50.252 DEBUG: 'Java CPD Block Indexer' skipped because there is no related file in current project 13:11:50.253 DEBUG: Sensors : SonarJavaXmlFileSensor -> BSL Squid Sensor -> Cobertura BSL Importer -> Zero Coverage Sensor 13:11:50.254 INFO: Sensor SonarJavaXmlFileSensor [java] 13:11:50.254 INFO: Sensor SonarJavaXmlFileSensor [java] (done) | time=1ms 13:11:50.254 INFO: Sensor BSL Squid Sensor [bsl] 13:11:55.035 INFO: Parsing metadata... 13:14:45.904 INFO: 1 source files to be analyzed 13:14:46.199 DEBUG: 'src/cf/TestModule.l1c' generated metadata with charset 'UTF-8' 13:14:46.351 WARN: Metric 'comment_lines_data' is deprecated. Provided value is ignored. 13:14:46.399 INFO: 1/1 source files have been analyzed 13:14:46.402 DEBUG: Start analyze of ACC results file 13:14:46.403 INFO: BSLAccResultsAggregator: ACC report not found : C:\jen\workspace\RNG\acc.xml 13:14:46.403 DEBUG: Aggregated results:0 13:14:46.403 INFO: Saving results... 13:14:46.405 INFO: 1 source files to be analyzed 13:14:46.581 INFO: Sensor BSL Squid Sensor [bsl] (done) | time=176327ms 13:14:46.581 INFO: 1/1 source files have been analyzed 13:14:46.581 INFO: Sensor Cobertura BSL Importer [bsl] 13:14:46.582 INFO: CoberturaSensor: Coverage report not found : C:\jen\workspace\RNG\cobertura-coverage.xml 13:14:46.582 INFO: Sensor Cobertura BSL Importer [bsl] (done) | time=1ms 13:14:46.583 INFO: Sensor Zero Coverage Sensor 13:14:46.596 INFO: Sensor Zero Coverage Sensor (done) | time=13ms 13:14:46.617 INFO: Calculating CPD for 1 file 13:14:46.623 DEBUG: Detection of duplications for C:/jen/workspace/RNG/src/cf/TestModule.l1c 13:14:46.641 INFO: CPD calculation finished 13:14:46.692 DEBUG: readpipe [git, --version],C:\Program Files\Git\cmd 13:14:46.896 DEBUG: readpipe may return 'git version 2.18.0.windows.1' 13:14:46.896 DEBUG: remaining output:
13:14:46.904 DEBUG: readpipe [git, config, --system, --edit],C:\Program Files\Git\cmd 13:14:47.147 DEBUG: readpipe may return 'C:/Program Files/Git/mingw64/etc/gitconfig' 13:14:47.147 DEBUG: remaining output:
13:14:47.365 INFO: Analysis report generated in 719ms, dir size=178 KB 13:14:47.418 INFO: Analysis reports compressed in 52ms, zip size=37 KB 13:14:47.418 DEBUG: Upload report 13:14:47.572 DEBUG: POST 200 http://192.168.36.48:9000/api/ce/submit?projectKey=RNG&projectBranch=master | time=151ms 13:14:47.575 INFO: Analysis report uploaded in 157ms 13:14:47.577 INFO: ANALYSIS SUCCESSFUL, you can browse http://192.168.36.48:9000/dashboard?id=RNG%3Amaster 13:14:47.577 INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report 13:14:47.577 INFO: More about the report processing at http://192.168.36.48:9000/api/ce/task?id=AWXXk2uYY_hFobvRkKE7 13:14:47.585 DEBUG: Report metadata written to C:\jen\workspace\RNG.scannerwork\report-task.txt 13:14:47.727 DEBUG: Post-jobs : GitLab Commit Issue Publisher 13:14:47.727 INFO: Executing post-job 'GitLab Commit Issue Publisher' 13:14:48.406 DEBUG: getPatchPositionsToLineMapping {65f32a6065b8c28a6b175d9f3e7f9908b2d8b542={sonar-project.properties=[Line{number=45, content='sonar.log.level=DEBUG'}]}} 13:14:48.708 INFO: Waiting quality gate to complete... 13:14:49.708 ERROR: Not find analyseId. Try increasing sonar.gitlab.query_max_retry 1, sonar.gitlab.query_wait 1000, or both. 13:14:49.988 INFO: ------------------------------------------------------------------------ 13:14:49.989 INFO: EXECUTION FAILURE 13:14:49.989 INFO: ------------------------------------------------------------------------ 13:14:49.989 INFO: Total time: 3:16.099s 13:14:50.200 INFO: Final Memory: 27M/89M 13:14:50.201 INFO: ------------------------------------------------------------------------ 13:14:50.201 ERROR: Error during SonarQube Scanner execution 13:14:50.201 ERROR: SonarQube failed to complete the review of this commit: Report processing is taking longer than the configured wait limit. 13:14:50.201 ERROR: Caused by: Report processing is taking longer than the configured wait limit. 13:14:50.201 ERROR: 13:14:50.201 ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging. [Pipeline] } ERROR: script returned exit code 1 [Pipeline] // catchError [Pipeline] } [Pipeline] // withSonarQubeEnv [Pipeline] updateGitlabCommitStatus [Pipeline] } [Pipeline] // timestamps [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // gitlabBuilds [Pipeline] } [Pipeline] // withCredentials [Pipeline] } [Pipeline] // withEnv [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline java.lang.IllegalArgumentException: No enum constant com.dabsquared.gitlabjenkins.gitlab.api.model.BuildState.FAILURE at java.lang.Enum.valueOf(Unknown Source) at org.jenkinsci.plugins.structs.describable.DescribableModel.coerce(DescribableModel.java:404) at org.jenkinsci.plugins.structs.describable.DescribableModel.buildArguments(DescribableModel.java:340) at org.jenkinsci.plugins.structs.describable.DescribableModel.instantiate(DescribableModel.java:281) at org.jenkinsci.plugins.workflow.steps.StepDescriptor.newInstance(StepDescriptor.java:201) at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:208) at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:153) at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122) at sun.reflect.GeneratedMethodAccessor911.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:157) at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:155) at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:155) at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:159) at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:129) at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:129) at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17) Caused: java.lang.IllegalArgumentException: Could not instantiate {name=6. Gate, state=FAILURE} for UpdateGitLabCommitStatusStep(name?: String, state?: BuildState[pending, running, canceled, success, failed, skipped]) at org.jenkinsci.plugins.structs.describable.DescribableModel.instantiate(DescribableModel.java:286) at org.jenkinsci.plugins.workflow.steps.StepDescriptor.newInstance(StepDescriptor.java:201) at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:208) at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:153) at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122) at sun.reflect.GeneratedMethodAccessor911.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:157) at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:155) at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:155) at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:159) at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:129) at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:129) at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17) at WorkflowScript.run(WorkflowScript:66) at cps.transform(Native Method) at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:57) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:109) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:82) at sun.reflect.GeneratedMethodAccessor293.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72) at com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.dispatch(CollectionLiteralBlock.java:55) at com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.item(CollectionLiteralBlock.java:45) at sun.reflect.GeneratedMethodAccessor296.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:103) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:82) at sun.reflect.GeneratedMethodAccessor293.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72) at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:60) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:109) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:82) at sun.reflect.GeneratedMethodAccessor293.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72) at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21) at com.cloudbees.groovy.cps.Next.step(Next.java:83) at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174) at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163) at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:122) at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:261) at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$101(SandboxContinuable.java:34) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.lambda$run0$0(SandboxContinuable.java:59) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:58) at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:174) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:332) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$200(CpsThreadGroup.java:83) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:244) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:232) at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:64) at java.util.concurrent.FutureTask.run(Unknown Source) at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:131) at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Finished: FAILURE`
Why change query_max_retry ? default value is 50
13:14:49.708 ERROR: Not find analyseId. Try increasing sonar.gitlab.query_max_retry 1, sonar.gitlab.query_wait 1000, or both.
I tried to use even 18 times for 10,000, but the result is the same. And with the default settings the result is the same
Still change jenkinsfile with code:
post { always { timestamps { timeout(time: 1, unit: 'HOURS') { waitForQualityGate abortPipeline: true } } } }
but also did not wait
For settings sonar.analysis.mode=publish have such errors
..... 16:05:03 16:05:03.265 INFO: Waiting quality gate to complete... 16:05:04 16:05:04.272 INFO: Waiting quality gate to complete... 16:05:05 16:05:05.279 INFO: Waiting quality gate to complete... 16:05:06 16:05:06.290 INFO: Waiting quality gate to complete... 16:05:07 16:05:07.298 INFO: Waiting quality gate to complete... 16:05:08 16:05:08.298 ERROR: Not find analyseId. Try increasing sonar.gitlab.query_max_retry 50, sonar.gitlab.query_wait 1000, or both. 16:05:47 16:05:45.848 INFO: ------------------------------------------------------------------------ 16:05:47 16:05:45.848 INFO: EXECUTION FAILURE 16:05:47 16:05:45.848 INFO: ------------------------------------------------------------------------ 16:05:47 16:05:45.849 INFO: Total time: 9:54.968s 16:05:54 16:05:52.880 INFO: Final Memory: 1530M/3435M 16:05:54 16:05:52.880 INFO: ------------------------------------------------------------------------ 16:05:54 16:05:52.880 ERROR: Error during SonarQube Scanner execution 16:05:54 16:05:52.880 ERROR: SonarQube failed to complete the review of this commit: Report processing is taking longer than the configured wait limit. 16:05:54 16:05:52.880 ERROR: Caused by: Report processing is taking longer than the configured wait limit. 16:05:54 16:05:52.880 ERROR: 16:05:54 16:05:52.880 ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging. [Pipeline] } [Pipeline] // withSonarQubeEnv [Pipeline] } [Pipeline] // timestamps Post stage [Pipeline] updateGitlabCommitStatus [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // gitlabBuilds [Pipeline] } [Pipeline] // withCredentials [Pipeline] } [Pipeline] // withEnv [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline ERROR: script returned exit code 1 Finished: FAILURE
In SonarQube, show Your Project > Administration > background Task and verify Duration
increased waiting time to 10 minutes (60*10000)
..... 16:37:57 16:37:57.777 INFO: CPD calculation finished 16:39:49 16:39:38.600 INFO: Analysis report generated in 97424ms, dir size=104 MB 16:39:57 16:39:57.108 INFO: Analysis reports compressed in 18506ms, zip size=22 MB 16:39:57 16:39:57.108 DEBUG: Upload report 16:39:59 16:39:59.296 DEBUG: POST 200 http://192.168.36.48:9000/api/ce/submit?projectKey=RNG&projectBranch=master | time=2184ms 16:39:59 16:39:59.299 INFO: Analysis report uploaded in 2190ms 16:39:59 16:39:59.301 INFO: ANALYSIS SUCCESSFUL, you can browse http://192.168.36.48:9000/dashboard?id=RNG%3Amaster 16:39:59 16:39:59.301 INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report 16:39:59 16:39:59.301 INFO: More about the report processing at http://192.168.36.48:9000/api/ce/task?id=AWXYT0LbY_hFobvRkKFC 16:39:59 16:39:59.308 DEBUG: Report metadata written to C:\jen\workspace\RNG.scannerwork\report-task.txt 16:39:59 16:39:59.439 DEBUG: Post-jobs : GitLab Commit Issue Publisher 16:39:59 16:39:59.439 INFO: Executing post-job 'GitLab Commit Issue Publisher' 16:40:00 16:40:00.162 DEBUG: getPatchPositionsToLineMapping {1eb1ad8090d28622c372f7ddcfbd9713f72533dd={jenkinsfile=[Line{number=76, content=' }'}, Line{number=75, content=' updateGitlabCommitStatus name: '5. QA', state: 'failed''}, Line{number=74, content=' failure {'}, Line{number=60, content=' //catchError {'}, Line{number=70, content=' post {'}, Line{number=71, content=' success {'}, Line{number=73, content=' }'}, Line{number=72, content=' updateGitlabCommitStatus name: '5. QA', state: 'success''}, Line{number=65, content=' //updateGitlabCommitStatus name: '5. QA', state: "${currentBuild.result}"'}, Line{number=62, content=' //}'}, Line{number=69, content=''}, Line{number=77, content=' }'}]}} 16:40:00 16:40:00.431 INFO: Waiting quality gate to complete... 16:40:10 16:40:10.441 INFO: Waiting quality gate to complete... 16:40:20 16:40:20.449 INFO: Waiting quality gate to complete... 16:40:30 16:40:30.458 INFO: Waiting quality gate to complete... 16:40:40 16:40:40.467 INFO: Waiting quality gate to complete... 16:40:50 16:40:50.475 INFO: Waiting quality gate to complete... 16:41:00 16:41:00.484 INFO: Waiting quality gate to complete... 16:41:11 16:41:10.493 INFO: Waiting quality gate to complete... 16:41:21 16:41:20.500 INFO: Waiting quality gate to complete... 16:41:31 16:41:30.509 INFO: Waiting quality gate to complete... 16:41:41 16:41:40.518 INFO: Waiting quality gate to complete... 16:41:51 16:41:50.525 INFO: Waiting quality gate to complete... 16:42:01 16:42:00.534 INFO: Waiting quality gate to complete... 16:42:11 16:42:10.542 INFO: Waiting quality gate to complete... 16:42:21 16:42:20.551 INFO: Waiting quality gate to complete... 16:42:31 16:42:30.559 INFO: Waiting quality gate to complete... 16:42:41 16:42:40.567 INFO: Waiting quality gate to complete... 16:42:51 16:42:50.575 INFO: Waiting quality gate to complete... 16:43:01 16:43:00.584 INFO: Waiting quality gate to complete... 16:43:11 16:43:10.592 INFO: Waiting quality gate to complete... 16:43:21 16:43:20.601 INFO: Waiting quality gate to complete... 16:43:31 16:43:30.610 INFO: Waiting quality gate to complete... 16:43:41 16:43:40.618 INFO: Waiting quality gate to complete... 16:43:51 16:43:50.626 INFO: Waiting quality gate to complete... 16:44:01 16:44:00.635 INFO: Waiting quality gate to complete... 16:44:11 16:44:10.643 INFO: Waiting quality gate to complete... 16:44:21 16:44:20.653 INFO: Waiting quality gate to complete... 16:44:31 16:44:30.662 INFO: Waiting quality gate to complete... 16:44:41 16:44:40.670 INFO: Waiting quality gate to complete... 16:44:52 16:44:50.678 INFO: Waiting quality gate to complete... 16:45:02 16:45:00.686 INFO: Waiting quality gate to complete... 16:45:12 16:45:10.694 INFO: Waiting quality gate to complete... 16:45:22 16:45:20.703 INFO: Waiting quality gate to complete... 16:45:32 16:45:30.710 INFO: Waiting quality gate to complete... 16:45:42 16:45:40.719 INFO: Waiting quality gate to complete... 16:45:52 16:45:50.728 INFO: Waiting quality gate to complete... 16:46:02 16:46:00.740 DEBUG: Requesting quality gate status for analysisId AWXYUUTjbpH8k9chmJhV 16:46:02 16:46:00.756 INFO: Quality gate status: ERROR 16:46:02 16:46:00.759 ERROR: Security Rating on New Code: 5 > 1 16:46:02 16:46:00.760 INFO: Reliability Rating on New Code : 1 16:46:02 16:46:00.760 INFO: Maintainability Rating on New Code : 1 16:46:02 16:46:00.760 ERROR: Duplicated Lines on New Code (%): 6.371237771002076 > 3 16:46:02 16:46:02.177 INFO: Report status=failed, desc=SonarQube reported QualityGate is error, with 2 error and 2 ok, no issues 16:46:28 16:46:27.543 INFO: Task total time: 14:45.552 s 16:46:28 16:46:27.669 INFO: ------------------------------------------------------------------------ 16:46:28 16:46:27.669 INFO: EXECUTION SUCCESS 16:46:28 16:46:27.669 INFO: ------------------------------------------------------------------------ 16:46:28 16:46:27.669 INFO: Total time: 14:47.808s 16:46:35 16:46:35.067 INFO: Final Memory: 1534M/4072M 16:46:35 16:46:35.067 INFO: ------------------------------------------------------------------------ [Pipeline] } [Pipeline] // withSonarQubeEnv [Pipeline] } [Pipeline] // timestamps Post stage [Pipeline] updateGitlabCommitStatus [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // gitlabBuilds [Pipeline] } [Pipeline] // withCredentials [Pipeline] } [Pipeline] // withEnv [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline Finished: SUCCESS
No report sent...
@SeregaANT sonar.gitlab.query_wait is millisecond 50 * 1000 = 50 seconds SonarQube analysis lasts an average of 6 minutes
Have you changed global template ?
Good day! Yes, I change on 60 times for 10,000 millisecond (=10 minutes). This problem was resolved. Now I can not get SonarQube to send information to the Gitlab on the errors of the current commit. I have 2 pipelines, but no info by errors...
Have you changed global template ?
yes
Setup:
Jenkins 2.138.1 SonarQube Community Edition 7.3 GitLab Community Edition 11.2.1 sonar-gitlab-plugin 4.0.0 GitLab API v4
sonar-project.properties:
sonar.host.url=http://localhost:9000 sonar.sourceEncoding=UTF-8 sonar.projectKey=MyProject sonar.sources=Path//to//sources// sonar.inclusions=*/.ext sonar.analysis.mode=publish sonar.issuesReport.console.enable=true sonar.issuesReport.html.enable=true sonar.issuesReport.json.enable=true
run sonar scanner:
..... withSonarQubeEnv('SonarServer') { catchError { bat "${sonarCommand} -Dsonar.projectVersion=${configurationVersion} -Dsonar.gitlab.project_id=${project_id} -Dsonar.gitlab.commit_sha=${GIT_COMMIT} -Dsonar.gitlab.ref_name=${GIT_BRANCH}" } }
INFO: Executing post-job 'GitLab Commit Issue Publisher' INFO: Waiting quality gate to complete... ERROR: Not find analyseId. Try increasing sonar.gitlab.query_max_retry 50, sonar.gitlab.query_wait 1000, or both. ..... INFO: EXECUTION FAILURE ..... ERROR: Error during SonarQube Scanner execution ERROR: SonarQube failed to complete the review of this commit: Report processing is taking longer than the configured wait limit. ERROR: Caused by: Report processing is taking longer than the configured wait limit.