Quality Gate failed: Could not find compute engine task URL in scanner report

I have a bitbucket pipeline configured, but it fails sonarcloud quality gate.

Can you share the content of your bitbucket-pipelines.yml file?

options:
docker: true

definitions:
services:
docker:
memory: 2048
caches:
sonar: ~/.sonar/cache # Caching SonarCloud artifacts will speed up your build
clone:
depth: full # SonarCloud scanner needs the full history to assign issues properly
pipelines:
#branches:
pull-requests:
‘**’:
- step:
name: SonarCloud-Scan and Quality-gate
script:
- pipe: sonarsource/sonarcloud-scan:1.4.0
- pipe: sonarsource/sonarcloud-quality-gate:0.1.5
variables:
SONAR_TOKEN: ${SONAR_TOKEN} # Get the value from the repository/workspace variable. You shouldn’t set secret in clear text here.
SONAR_HOST_URL: ${SONAR_HOST_URL} # Get the value from the repository/workspace variable.
# SONAR_SCANNER_OPTS: -Xmx512m
DEBUG: “true”

It seems pretty unlikely this is the same one, as the screenshot you shared shows version 0.1.6 of the sonarsource/sonarcloud-quality-gate task, rather than 0.1.5. Are you sure you’ve shared the right one?

This is the code


# enable Docker for your repository
options:
    docker: true

definitions:
    services:
        docker:
            memory: 2048
    caches:
     sonar: ~/.sonar/cache  # Caching SonarCloud artifacts will speed up your build
clone:
  depth: full    # SonarCloud scanner needs the full history to assign issues properly
pipelines:
    #branches:
      pull-requests:
        '**':
            - step:
               name: SonarCloud-Scan and Quality-gate
               script:
                - pipe: sonarsource/sonarcloud-scan:1.4.0
                - pipe: sonarsource/sonarcloud-quality-gate:0.1.6               
                  variables:
                    SONAR_TOKEN: ${SONAR_TOKEN} # Get the value from the repository/workspace variable. You shouldn't set secret in clear text here.
                    SONAR_HOST_URL: ${SONAR_HOST_URL} # Get the value from the repository/workspace variable.
                   # SONAR_SCANNER_OPTS: -Xmx512m
                    DEBUG: "true"

Hello Colin
Any Updates?

Thanks

Hey there.

Please do not bump threads.

Thanks for sharing the YAML.

I am going to guess that sonarsource/sonarcloud-scan:1.4.0 is not actually succeeding. What do the logs say about the output of this pipe? Was the analysis successful?

Yes, analysis was successful.

Can you share a snippet of the logs that show this?

yes sure, kindly find the attachment
pipelineLog-{61cb53e4-b098-4c92-a865-c1fc05102449} (1).txt (20.5 KB)

It looks like you’ve included sonar.qualitygate.wait=true somewhere in your configuration. Can you try to remove this, and rely solely on the sonarsource/sonarcloud-quality-gate pipe?

Yes it worked.
Thanks

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.