Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-62169

Error executing sonarqube on gradle in docker container

    Details

    • Type: Bug
    • Status: Fixed but Unreleased (View Workflow)
    • Priority: Trivial
    • Resolution: Won't Fix
    • 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
    • Similar Issues:
    • Released As:
      2.231

      Description

      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.

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              lawyd Eryk Lawyd
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: