From 8da1e22b8053cfb0b62e658005230c6ba58dff99 Mon Sep 17 00:00:00 2001
From: Johannes Innerbichler <j.innerbichler@gmail.com>
Date: Tue, 18 Dec 2018 11:17:04 +0100
Subject: [PATCH] Added dependencies to Jenkins build.

---
 Jenkinsfile | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/Jenkinsfile b/Jenkinsfile
index 62466ea..2b8edfa 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -9,6 +9,15 @@ node('nimble-jenkins-slave') {
             git(url: 'https://github.com/nimble-platform/trust-scoring-service', branch: env.BRANCH_NAME)
         }
 
+        stage('Build Dependencies') {
+            sh 'rm -rf common'
+            sh 'git clone https://github.com/nimble-platform/common'
+            dir('common') {
+                sh 'git checkout ' + env.BRANCH_NAME
+                sh 'mvn clean install'
+            }
+        }
+
         stage('Build Java') {
             sh 'mvn clean package -DskipTests'
         }
@@ -35,6 +44,15 @@ node('nimble-jenkins-slave') {
             git(url: 'https://github.com/nimble-platform/trust-scoring-service', branch: env.BRANCH_NAME)
         }
 
+        stage('Build Dependencies') {
+            sh 'rm -rf common'
+            sh 'git clone https://github.com/nimble-platform/common'
+            dir('common') {
+                sh 'git checkout ' + env.BRANCH_NAME
+                sh 'mvn clean install'
+            }
+        }
+
         stage('Build Java') {
             sh 'mvn clean package -DskipTests'
         }
@@ -49,6 +67,15 @@ node('nimble-jenkins-slave') {
             git(url: 'https://github.com/nimble-platform/trust-scoring-service', branch: 'master')
         }
 
+        stage('Build Dependencies') {
+            sh 'rm -rf common'
+            sh 'git clone https://github.com/nimble-platform/common'
+            dir('common') {
+                sh 'git checkout master'
+                sh 'mvn clean install'
+            }
+        }
+
         stage('Set version') {
             sh 'mvn versions:set -DnewVersion=' + env.TAG_NAME
         }