[JIRA] (JENKINS-62169) Error executing sonarqube on gradle in docker container

2 views
Skip to first unread message

eryklawyd@gmail.com (JIRA)

unread,
May 5, 2020, 5:49:03 PM5/5/20
to jenkinsc...@googlegroups.com
Eryk Lawyd created an issue
 
Jenkins / Bug JENKINS-62169
Error executing sonarqube on gradle in docker container
Issue Type: Bug Bug
Assignee: Unassigned
Attachments: jenkins_pipeline.groovy
Components: sonar-quality-gates-plugin
Created: 2020-05-05 21:48
Environment: Jenkins Comunity Edition - v2.231
SonarQube Scanner plugin- v2.11
Docker Pipeline plugin - v1.23
Docker plugin - v1.2.0
Groovy plugin - v2.2
Gradle image - takitake/gradle-alpine
Labels: pipeline plugins jenkins exception
Priority: Trivial Trivial
Reporter: Eryk Lawyd

The scenario is:

      • Using declarative pipeline following the "pipeline syntax" executing the steps: 
  • Create a AWS ECR (elastic container repository) with image takitake/gradle-alpine  called my-gradle-apline
  • Use this image my-gradle-apline  on pipeline to run all executions inside a container.

Error scenario steps:
1 - download the image takitake/gradle-alpine 
2 - running a project gradle inside the container using the image above and build it - this stage with success
3 - running sonarqube command by graddle inside the container using image above and build it (gradle and groovy pipeline) result in error.

Test Scenarios for troubleshooting:
1 - running a job pipeline template with groovy (pipeline declarative by groovy sandbox) the task exit saying: [ Execution failed for task ':sonarqube'.  Unable to execute SonarQube ]
2 - running the same command sonarqube used on pipeline inside a container -

3 - running a freestyle job executing the same steps of pipeline but in Build > Execute SonarQube Scanner [ Execution: Success ]

Commands from pipeline:

  • Build:  sh "./gradlew clean build --console=plain --no-daemon -PmavenSettingsPath=${PATH_TO_SETTINGS_XML}"
  • sonarqube scanner: sh "./gradlew sonarqube --debug -PmavenSettingsPath=${$PATH_TO_SETTINGS_XML} -Dsonar.login=${secret} -Dsonar.projectKey=${sonarProjectkey} -Dsonar.projectName=${sonarProjectName}"       

 I'm already read in some fórum this is a incompatibility for groovy and gradle language.There's any other option to running sonarqube command in declarative pipeline for gradle running inside in docker container?

If you need the pipeline syntax just let me know.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages