I have a Concourse pipeline that runs a SonarQube Scan. Since the Sonar Scan uses Java, we need to make sure our Sonar Scan uses the appropriate version. I’m trying to update the Java version to 11 but the pipeline is still pointing to Java 1.8.
set -e
npm install -g n
n 14.16.0
node -v
npm -v
cd server/
export token=$(command to get token)
echo "registry = npm registry url
npm ci
cd ..
flow sonar scan $ENVIRONMENT
Can you check your SonarQube page footer and share the SonarQube version?
This doesn’t impact the JVM version analysis is run with. By the time these properties are read, the JVM has already started. This property tells the analyzer that you’re writing Java 11.
What you need to do is make sure the correct version of Java is installed on your build agent, and that it’s used to fire the analysis job. I’m not familiar with Concourse, so I can’t give you the exact syntax to do that, though.