Freeze in initial analysis after build in bitbucket pipeline

I’m on bitbucket pipelines trying to integrate sonarCloud.
After getting the pipeline to build, I got sonarCloud’s part of things to freeze - possibly in the typescript analysis - for >10 minutes before cancelling.

Here is my yaml file

image: node:16.14.2
clone:
  depth: full              # SonarCloud scanner needs the full history to assign issues properly

definitions:
  caches:
    sonar: ~/.sonar/cache  # Caching SonarCloud artifacts will speed up your build
  steps:        
    - step: &create-dot-env
        name: Create .env file
        script:
        - echo $DOTENV_V2 | base64 --decode --ignore-garbage > .env
        - cat .env
        artifacts:
          - .env
    - step: &build-test-sonarcloud
        name: Build, test and analyze on SonarCloud
        caches:
          - node           # See https://confluence.atlassian.com/bitbucket/caching-dependencies-895552876.html
          - sonar
        script:
          - yarn install
          - yarn build           # Build your project and run
          - pipe: sonarsource/sonarcloud-scan:1.4.0
        artifacts:
          - node_modules/**
    - step: &check-quality-gate-sonarcloud
        name: Check the Quality Gate on SonarCloud
        script:
          - pipe: sonarsource/sonarcloud-quality-gate:0.1.6

pipelines:
  branches:
    master:
      - step: *create-dot-env
      - step: *build-test-sonarcloud
      - step: *check-quality-gate-sonarcloud
  pull-requests:
    '**':
      - step: *create-dot-env
      - step: *build-test-sonarcloud
      - step: *check-quality-gate-sonarcloud

and the bottom of the logs where it froze

Hello Paul,

Welcome to the Community! Thanks for bringing this up.

Could you please share the content of your tsconfig.json file(s)?
The relevant configuration in sonar-project.properties?

Do you have multiple TypeScript projects inside the repo?
Could you please share your relevant folder structure and the location of the tsconfig.json file(s)?

Best,
Gabriel

Hi Gabriel,
Thanks for replying. I actually ran it again and got an error specified I didn’t have enough memory allocated for docker, which I was able to fix. I don’t know why it didn’t say initially, which is maybe something to fix, but I’m off and running!

Cool! Glad to hear that you’re off to go!

Could you share the memory increase you did?
And roughly how many line of code you’re checking?

Cheers,
Gabriel

I just added this

definitions:
  services:
    docker:
      memory: 2048

Project is around 15k lines

1 Like

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