diff --git a/Jenkinsfile b/Jenkinsfile index 0edfd1c..e5f7870 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,6 +17,21 @@ pipeline { } stages { + stage('SonarQube Analysis') { + steps { + script { + scannerHome = tool 'sonarqube-scanner'// must match the name of an actual scanner installation directory on your Jenkins build agent + } + withSonarQubeEnv('sonarqube-server') {// If you have configured more than one global server connection, you can specify its name as configured in Jenkins + sh "${scannerHome}/bin/sonar-scanner \ + -Dsonar.organization=ganthepro \ + -Dsonar.projectKey=ganthepro_edusaig \ + -Dsonar.sources=. \ + -Dsonar.host.url=https://sonarcloud.io" + } + } + } + stage('Build') { steps { script {