Quality Gate check timeout exceeded in bitbucket pipeline

759 Views Asked by At

I am adding Sonarqube to my project. but it shows an error when running the bitbucket pipeline and the pipeline gets fail. it says timeout issue. I am using sonar for my reactnative application. how can solve this issue?

here is my bitbucket-pipelines.file

pipelines:
 branches:
   final_design:
    - step: 
        name: final_design_sonar 
        image: node:16
        script:
          - pipe: sonarsource/sonarqube-scan:1.1.0
            variables:
              SONAR_HOST_URL: ${SONAR_HOST_URL} 
              SONAR_TOKEN: ${SONAR_TOKEN}

sonar-project.properties file:

sonar.projectKey=battle-buddies-rn-app
sonar.exclusions=.github/**, .vscode/**, android/**, assets/**, build/**, ios/**, node_modules/**, scripts/**
sonar.qualitygate.wait=true

here are my errors logs:

07:04:00.026 DEBUG: eslint-bridge server will shutdown

07:04:05.757 INFO: ------------------------------------------------------------------------

07:04:05.757 INFO: EXECUTION FAILURE

07:04:05.757 INFO: ------------------------------------------------------------------------

07:04:05.757 INFO: Total time: 6:26.115s

07:04:05.850 INFO: Final Memory: 19M/63M

07:04:05.850 INFO: ------------------------------------------------------------------------

07:04:05.850 ERROR: Error during SonarScanner execution

Quality Gate check timeout exceeded
1

There are 1 best solutions below

0
fayir On

I tried lots of solutions at the end I found this, just add "timeout: 800"

pipelines:
 branches:
   final_design:
    - step: 
        name: final_design_sonar 
        image: node:16
        script:
          - pipe: sonarsource/sonarqube-scan:1.1.0
            variables:
              SONAR_HOST_URL: ${SONAR_HOST_URL} 
              SONAR_TOKEN: ${SONAR_TOKEN}
              EXTRA_ARGS: '-X'  #
        timeout: 800

EXTRA_ARGS: Specifies any additional arguments that you want to pass to the SonarQube Scanner command. In this case, it includes -X, which enables debug logging for the scanner.

timeout: Specifies the maximum duration (in seconds) that the SonarQube Scanner step is allowed to run before it times out. In this case, it is set to 800 seconds (i.e., 8 minutes).