diff --git a/jenkins/cd/Jenkinsfile b/jenkins/cd/Jenkinsfile index 3e2a40b..c573b82 100644 --- a/jenkins/cd/Jenkinsfile +++ b/jenkins/cd/Jenkinsfile @@ -17,16 +17,26 @@ pipeline { stages { stage('Build') { steps { - // dir('messaging-app') { + // dir('messaging-app') { sh 'mvn clean verify' - // } + // } } } + + stage('Static Code Analysis') { + steps { + withSonarQubeEnv('cicd') { + sh 'mvn sonar:sonar' + } + } + + // maven:end + } stage('Publish Pacts') { steps { - // dir('messaging-app') { + // dir('messaging-app') { sh 'mvn pact:publish -Dpact.consumer.version=${GIT_COMMIT} -Dpact.tag=${BRANCH_NAME}' - // } + // } } } stage('Check Pact Verifications') {