Scan Pipe integration via bitbucket

We have started using the cloud version of the Team package, but we are experiencing problems setting up our pipelines. We are trying to configure them, but the Bitbucket job freezes at different steps until it times out (this can take up to 30 minutes).

steps:
    - step: &build-test-sonarcloud
        name: Build, test and analyze on SonarCloud
        size: 2x
        caches:
          - node
          - sonar
        script:
          - pipe: sonarsource/sonarcloud-scan:3.0.0
            variables:
              SONAR_TOKEN: ${SONAR_TOKEN_CLOUD}
              EXTRA_ARGS: ''
          - pipe: sonarsource/sonarcloud-quality-gate:0.1.6

However, when we are using this config seems it works
steps:

 - step: &build-test-sonarcloud
      name: Build, test and analyze on SonarCloud
      image: sonarsource/sonar-scanner-cli:latest
      size: 4x
      caches:
        - node
        - sonar
      script:
        - |
          sonar-scanner \
            -Dsonar.host.url=https://sonarcloud.io \
            -Dsonar.token=${SONAR_TOKEN}

Could you please help us understand the correct way to configure our project and identify what we might be missing?

Hi,

Welcome to the community!

It’s not clear to me why you would try to change from a working configuration. If it analyzes the code, then it’s “correct” enough.

That said, I notice this difference between the two configurations:

Without seeing the analysis logs, it’s difficult to know for sure, but not having enough memory could certainly explain why analysis freezes.

Can you bump the size up to 4x and see if that fixes the problem? And if it doesn’t, could you provide your analysis log?

The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.

This guide will help you find them.

 
Thx,
Ann