Pipe: sonarsource/sonarcloud-scan:1.4.0, but sonar still using 1.2.0

Received the following error (below) and upgraded to pipe: sonarsource/sonarcloud-scan:1.4.0 in the bitbucket-pipelines.yml, but sonar is still using pipe: sonarsource/sonarcloud-scan:1.2.0` and giving the same error. Is there something I am missing?

ERROR: 
The version of node.js (12) you have used to run this analysis is deprecated and we stopped accepting it.
Please update to at least node.js 14. You can find more information here: https://docs.sonarcloud.io/appendices/scanner-environment/

File:

image: python:3.6

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

  services:
    docker:
      memory: 2048

  steps:
  - step: &build-test-sonarcloud
          name: Build, test, and analyze on SonarCloud
          caches:
          - sonar
          script:
          # - commands to build and run tests go here
          - pipe: sonarsource/sonarcloud-scan:1.4.0
            variables:
              SONAR_SCANNER_OPTS: -Xmx512m
  - step: &check-quality-gate-sonarcloud
          name: Check the Quality Gate on SonarCloud
          script:
          - pipe: sonarsource/sonarcloud-quality-gate:0.1.3
            variables:
              SONAR_SCANNER_OPTS: -Xmx512m

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

Hey there.

Maybe we’ve been relying on people using sonarsource/sonarcloud-github-action@master:thinking: because indeed, using 1.6 of the action refers to an older version of the sonarsource/sonar-scanner-cli docker image that doesn’t have the newer versions of NodeJS.

I’ll flag this thread for attention, as it makes sense we cut a new version. To immediately fix the issue, you can change to sonarsource/sonarcloud-github-action@master.

And, I guess I’d like to make sure I understand from you the motivation to pin a specific version. Just don’t want to be surpised by a change on our side?

Hi Colin,

Thanks for replying.

I did what you suggested, and the pipeline failed immediately due to the following error:

Configuration error
Your pipe name is in an invalid format. Check the name of the pipe and try again.

Additionally, we do not have the need to pin a specific version.

How is your GitHub Actions YAML (now) configured?

Might be productive to mention we are using bitbucket. Here is the file:

image: python:3.6

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

  services:
    docker:
      memory: 2048

  steps:
  - step: &build-test-sonarcloud
          name: Build, test, and analyze on SonarCloud
          caches:
          - sonar
          script:
          # - commands to build and run tests go here
          - pipe: sonarsource/sonarcloud-github-action@master
            variables:
              SONAR_SCANNER_OPTS: -Xmx512m
  - step: &check-quality-gate-sonarcloud
          name: Check the Quality Gate on SonarCloud
          script:
          - pipe: sonarsource/sonarcloud-quality-gate:0.1.6
            variables:
              SONAR_SCANNER_OPTS: -Xmx512m

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

Hi Colin,

We figured out the problem- it was something on our end. We didn’t have the new pipeline version merged in all the right branches.

Thanks for your help!

2 Likes

I’m glad you got it sorted out.

I also just realized that for some reason, I really thought you were using GitHub Actions. And it was Bitbucket Pipelines the entire time. :man_facepalming: Sorry about that.