Analysis incorrect AXvp8NoajWeJRfcwLHEp

When im trying to analyse the code for a particular PR from bitbucket pipelines, no matter how many times I re-run the analysis, Sonarcloud always show the older code and marks the Quality gate as failed.

It does not pick up the changes that were made specifically to fix the issues that were flagged up sonarcloud.

Hi @Kunal_Gupta , thank you for taking the time to report this. Could you please share your bitbucket-pipelines.yml file so we can know more about your setup?

Best regards,
Antonio

# This is a sample build configuration for Docker.
# Check our guides at https://confluence.atlassian.com/x/O1toN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.

#image: docker:stable
image: docker/compose
# image: atlassian/default-image:2

# setting this for sonarcloud
clone:
  depth: full

definitions:
  services:
    docker:
      memory: 3072
  caches:
    sonar: ~/.sonar/cache  # Caching SonarCloud artifacts will speed up your build
  steps:
    - step: &sonarcloud
        name: Analyze on SonarCloud
        caches:
          - sonar
        script:
          - pipe: sonarsource/sonarcloud-scan:1.2.0
          - pipe: sonarsource/sonarcloud-quality-gate:0.1.4
    
    - step: &docker-build-step-dev
        name: Build, test
        clone:
          depth: 1
        services:
          - docker
        caches:
          - docker
        script:
          - docker-compose -v
          - docker-compose -f docker/docker-compose.ci.yml up -d --build
          - cd docker
          - docker-compose logs kelvin-web-client
          # - docker-compose -f docker-compose.testing.yml exec -T kelvin-web-client python3 -m pytest tests/
    

pipelines:
  branches:
    release/*:
      - step: *sonarcloud

    master:
      - step: *sonarcloud

  
    '{feature/*,bugfix/*}': # run on pushes to feature/* and bugfix/* branches
      - step: *sonarcloud

          
  pull-requests:
    release/*: # run on PRs from release/* branches
      - step: *sonarcloud
    

    '{feature/*,bugfix/*}': # run on PRs from feature/* and bugfix/* branches
      - step: *sonarcloud