Warning Sonarcloud requires 11+ Java version

Since today morning I started getting this warning : Warning

  • The version of Java (11.0.3) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17. Read more

We are using bitbucket pipeline for sonarcloud scanner, wanted to get a proper solution around this.
Tried this pipeline but no luck :

image : openjdk:17-jdk-slim
clone:
  depth: full              # SonarCloud scanner needs the full history to assign issues properly

definitions:
  services:
    postgres:
      image: postgres
    docker:
      memory: 3072
      size: 2x
  caches:
    sonar: ~/.sonar/cache  # Caching SonarCloud artifacts will speed up your build
  steps:
    - step: &build-test-sonarcloud
        name: Build, test and analyze on SonarCloud
        caches:
          - sonar
        script:
          - pipe: sonarsource/sonarcloud-scan:1.4.0
    - step: &check-quality-gate-sonarcloud
        name: Check the Quality Gate on SonarCloud
        script:
          - pipe: sonarsource/sonarcloud-quality-gate:0.1.6
    - step: &merge-checks
        name: merge-checks
        script:
          - /bin/bash merge_checks.sh "${BITBUCKET_PR_DESTINATION_BRANCH}" "${BITBUCKET_BRANCH}"

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

Hi @Lokendra_R

Version 2.0.0 of the pipe is available now, and you may switch to it to get rid of the warning since this version is built and run using Java 17.

HTH,
Mickaƫl

2 Likes

@mickaelcaro Works, thanks.

1 Like

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