From 18efbeaf1b5e233a7d7ba383f783ea567648a5de Mon Sep 17 00:00:00 2001 From: Mali Bayhan Date: Fri, 10 Dec 2021 11:48:50 -0800 Subject: [PATCH] master- Sync Repo --- jenkins/cd/Jenkinsfile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/jenkins/cd/Jenkinsfile b/jenkins/cd/Jenkinsfile index b2489a8..2f8c3ee 100644 --- a/jenkins/cd/Jenkinsfile +++ b/jenkins/cd/Jenkinsfile @@ -11,13 +11,21 @@ pipeline { stages { stage ('Build') { steps { - // dir('user-service') { + // dir('user-service') { sh 'mvn clean verify ' + "-Dpact.provider.version=${GIT_COMMIT} " + '-Dpact.verifier.publishResults=true' - // } + // } } } + + stage('Static Code Analysis') { + steps { + withSonarQubeEnv('cicd') { + sh 'mvn sonar:sonar' + } + } + stage('Check Pact Verifications') { steps { sh 'curl -LO https://github.com/pact-foundation/pact-ruby-standalone/releases/download/v1.88.3/pact-1.88.3-linux-x86_64.tar.gz' @@ -35,5 +43,5 @@ pipeline { echo 'Deploying to prod now...' } } + } } -}