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