Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question]: no results shown on SonarQube #19809

Open
1 of 4 tasks
rotekii opened this issue Apr 23, 2024 · 0 comments
Open
1 of 4 tasks

[Question]: no results shown on SonarQube #19809

rotekii opened this issue Apr 23, 2024 · 0 comments

Comments

@rotekii
Copy link

rotekii commented Apr 23, 2024

Task name

No response

Task version

No response

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

Ubuntu 20.04

Question

I'm trying to execute a pipeline on an android application, but there is no result shown on SonarQube

trigger:
- develop

pool:
  name: name_of_my_pool

steps:
- task: SonarQubePrepare@5
  inputs:
    SonarQube: 'name_of_the_project'
    scannerMode: 'Other'
    extraProperties: |
      # Additional properties that will be passed to the scanner,
      # Put one key=value per line, example:
      # sonar.exclusions=**/*.bin
      sonar.projectKey=my_project-key
      sonar.projectName=my_project_name

- script: |
    java -version
    wget https://builds.openlogic.com/downloadJDK/openlogic-openjdk/17.0.10+7/openlogic-openjdk-17.0.10+7-linux-x64.tar.gz -O JAVA_HOME_17_X64.tar.gz
    tree
  displayName: Download JDK17

- task: JavaToolInstaller@0
  inputs:
    versionSpec: '17'
    jdkArchitectureOption: 'x64'
    jdkSourceOption: 'LocalDirectory'
    jdkFile: 'JAVA_HOME_17_X64.tar.gz'
    jdkDestinationDirectory: '$(Agent.ToolsDirectory)/JAVA_HOME_17/X64'
    cleanDestinationDirectory: true
    createExtractDirectory: false


- script: |
    java -version
    echo Environment Variable JAVA_HOME_17_X64 is $(JAVA_HOME_17_X64)
    tree $(Agent.ToolsDirectory)
  displayName: Check JDK version

- task: Gradle@3
  inputs:
    gradleWrapperFile: '$(Build.Repository.LocalPath)/gradlew'
    workingDirectory: '$(Build.Repository.LocalPath)'
    tasks: 'build'
    publishJUnitResults: true
    testResultsFiles: '**/TEST-*.xml'
    javaHomeOption: 'JDKVersion'
    jdkVersionOption: '1.17' # Use pre-installed JAVA17
    gradleOptions: '-Xmx3072m'
    sonarQubeRunAnalysis: true
    sqGradlePluginVersionChoice: 'specify'
    sonarQubeGradlePluginVersion: '2.6.1'
    spotBugsAnalysis: false
    
- task: SonarQubePublish@5
  condition: always()
  inputs:
    pollingTimeoutSec: '300'

Although during the build, SonarQube analysis is enabled, but during SoanrQube Publish I receive this warning: No analyses found in this build! Please check your build configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants