From ee27ecf66b35a43a026d91e5903f5444cfd47fb5 Mon Sep 17 00:00:00 2001 From: OZGCloud <ozgcloud@mgm-tp.com> Date: Wed, 2 Jun 2021 17:24:09 +0200 Subject: [PATCH] add sonarqube --- Jenkinsfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 4aff3daaf..b4d2aa29c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -28,6 +28,14 @@ pipeline { sh 'mvn --version' sh 'mvn -s $MAVEN_SETTINGS clean install spring-boot:build-image -Dmaven.wagon.http.retryHandler.count=3' } + + script { + if (env.BRANCH_NAME == 'master') { + withSonarQubeEnv('sonarqube-ozg-sh'){ + sh 'mvn sonar:sonar' + } + } + } } } post { -- GitLab