Sonarqube stage is failing in jenkins declarative pipeline, were as current sonarqube 9.9LTS requires jdk 17 for sonar scanner, our application teams are using 8 and it will fail the jenkins jobs and jenkins also run on same java 8 

However, it worked with below configuration 




stage('Sonarqube Analysis'){
                when{
                    expression { params.Env == 'DEV'}
                    }
                    tools {
                            jdk "JDK-17" 
                        }
                environment{
                
                    scannerHome = tool 'sonar-scanner-4.8.0'
                }

Instead of updating every job is there is any alternate option were we can configure from jenkins so that there will be no issues to the application team to change in every job

0

There are 0 best solutions below