admin管理员组文章数量:1377530
I'm in the process of upgrading Angular from 9 to 18. So far it has been fine to get to Angular 14. However, when upgrading to Angular 15 I also had to upgrade Node, which resulted in upgrading sonar for compatibility.
When I run my Gradle commands to clean, install dependencies, run tests and upload the report to Sonar, this all works fine. However the same sonar configuration is failing in Jenkins with this error message:
Access to the multi-values/property set property 'sonar.javascript.file.suffixes' should be made using 'getStringArray' method. The SonarQube plugin using this property should be updated.
Access to the multi-values/property set property 'sonar.typescript.file.suffixes' should be made using 'getStringArray' method. The SonarQube plugin using this property should be updated.
Unclosed counted closure near index 5
/\d{1
java.lang.IllegalStateException: Failed to upload report: Unclosed counted closure near index 5
/\d{1
at .sonar.scanner.report.ReportPublisher.upload(ReportPublisher.java:243)
at .sonar.scanner.report.ReportPublisher.execute(ReportPublisher.java:163)
at .sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:178)
at .sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
at .sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
at .sonar.scanner.bootstrap.SpringScannerContainer.doAfterStart(SpringScannerContainer.java:356)
at .sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
at .sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
at .sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:142)
at .sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
at .sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
at .sonar.scanner.bootstrap.ScannerMain.runScannerEngine(ScannerMain.java:151)
at .sonar.scanner.bootstrap.ScannerMain.run(ScannerMain.java:66)
at .sonar.scanner.bootstrap.ScannerMain.main(ScannerMain.java:52)
Caused by: .sonar.api.utils.MessageException: Unclosed counted closure near index 5
/\d{1
> Task :sonar FAILED
The issues about access to mutli-values/property happen locally as well but do not cause an issue. The failing issue seems to be:
Unclosed counted closure near index 5
/\d{1
java.lang.IllegalStateException: Failed to upload report: Unclosed counted closure near index 5
I'm really struggling to find anyone else online that has had this issue before and AI isn't helping at all. Does anyone have an idea what could be blocking this.
The node version is 18.20.7
For reference this is my sonar setup in gradle:
sonarqube {
properties {
property "sonar.projectKey", "$project.group:$project.name".replace(' ', '-')
property "sonar.sourceEncoding", "UTF-8"
property "sonar.javascript.lcov.reportPaths", "coverage/lcov.info"
property "sonar.testExecutionReportPaths", "reports/ut_report.xml"
property "sonar.test.inclusions", "**/*.spec.ts"
def projectName = "$project.name"
if (project.hasProperty('sonarProjectName')) {
projectName = "$sonarProjectName"
}
property "sonar.javascript.file.suffixes", ".js,.jsx"
property "sonar.typescript.file.suffixes", ".ts,.tsx"
property "sonar.projectName", projectName
property "sonar.sources", "./projects/$project.name"
property "sonar.tests", "./projects/$project.name"
property "sonar.coverage.exclusions", "src/environments/*.ts"
property "sonar.verbose", "true"
property "sonar.debug", "true"
}
}
本文标签: angularSonar works fine locally but not in JenkinsStack Overflow
版权声明:本文标题:angular - Sonar works fine locally but not in Jenkins - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744400039a2604417.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论