I need to integrate sonarqube with liferay 7.1 using gradle in jenkins pipeline.
i have tried the below code in root workspace of the Liferay
stage('SonarQube Analysis') {
steps {
withSonarQubeEnv(credentialsId: 'jenkins-token',, installationName: 'SONAR') {
dir("${GRADLE_ROOT_DIRECTORY}") {
bat "gradle sonarqube"
}
}
}
}
Error
Task :sonarqube FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':sonarqube'. Unable to execute SonarQube
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Also i need to know how we can run a Gradle command for specific project inside a Liferay workspace.