]
Josef Kopriva commented on JBIDE-26555:
---------------------------------------
PR decorations from sonarcloud is working for jbosstools-server, jbosstools-openshift,
jbosstools-base.
The main problem was with sonar parameters in jobs and also settings of triggers in sonar
build jobs.
Example settings for PR check job:
{code:java}
clean
verify
sonar:sonar
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.organization=default
-Dsonar.projectKey=org.jboss.tools:openshift
-Dsonar.login=
-Dsonar.pullrequest.github.token.secured=
-Dsonar.pullrequest.github.endpoint=https://api.github.com/
-Dsonar.pullrequest.github.repository=jbosstools/jbosstools-openshift
-Dsonar.pullrequest.provider=GitHub
-Dsonar.pullrequest.key=${ghprbPullId}
-Dsonar.pullrequest.branch=${ghprbSourceBranch}
-Dsonar.pullrequest.base=master
-Dsonar.scm.provider=git
-U -fae -e -X
{code}
Example parameters for build:
{code:java}
clean verify sonar:sonar ${MAVEN_FLAGS}
-Dsonar.projectKey=org.jboss.tools:openshift
-Dsonar.organization=default
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.login=
{code}
PR checks fail bcs of jenkins
-----------------------------
Key: JBIDE-26555
URL:
https://issues.jboss.org/browse/JBIDE-26555
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: openshift
Affects Versions: 4.10.0.AM1
Reporter: Andre Dietisheim
Assignee: Josef Kopriva
Priority: Blocker
Labels: build, github, pull_request, sonar
Fix For: 4.11.0.AM1
Latest PRs in github are not built successfully on jenkins any more and seem to point at
sonar.
This also matches the fact that we didnt see any sonar report any more for quite some
time.
ex.
https://github.com/jbosstools/jbosstools-openshift/pull/1830 is red in [jenkins build
#1967|https://dev-platform-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/job/jbosstools-openshift-Pull-Request/1967]
with the following output:
{code}
[ERROR] Failed to execute goal
org.sonarsource.scanner.maven:sonar-maven-plugin:3.3.0.603:sonar (default-cli) on project
openshift:
Error 404 on
https://sonarcloud.io/api/sources/hash?key=org.jboss.tools%3Aopenshift%3A...
: {"errors":[{"msg":"Component key
'org.jboss.tools:openshift:plugins/org.jboss.tools.openshift.common.ui/src/org/jboss/tools/openshift/internal/common/ui/utils/OCCommandUtils.java'
not found"}]} -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal
org.sonarsource.scanner.maven:sonar-maven-plugin:3.3.0.603:sonar (default-cli) on project
openshift: Error 404 on
https://sonarcloud.io/api/sources/hash?key=org.jboss.tools%3Aopenshift%3A...
: {"errors":[{"msg":"Component key
'org.jboss.tools:openshift:plugins/org.jboss.tools.openshift.common.ui/src/org/jboss/tools/openshift/internal/common/ui/utils/OCCommandUtils.java'
not found"}]}
{code}