Index: Jenkinsfile
===================================================================
--- Jenkinsfile	(revision 4cf2472f2b5659dfb57b51b9748e18e9dcb9c543)
+++ Jenkinsfile	(revision 1cc4390a9eac2ad86029fdf9cdced2a90cceb75b)
@@ -4,6 +4,6 @@
 // Main loop of the compilation
 //===========================================================================================================
-node ('master'){
-
+
+node('master') {
 	// Globals
 	BuildDir  = pwd tmp: true
@@ -26,19 +26,28 @@
 			Settings = prepare_build()
 
-			clean()
-
-			checkout()
-
-			notify_server(0)
-
-			build()
-
-			test()
-
-			benchmark()
-
-			build_doc()
-
-			publish()
+			node(Settings.Architecture.node) {
+				BuildDir  = pwd tmp: true
+				SrcDir    = pwd tmp: false
+
+				clean()
+
+				checkout()
+
+				notify_server(0)
+
+				build()
+
+				test()
+
+				benchmark()
+
+				build_doc()
+
+				publish()
+			}
+
+			// Update the build directories when exiting the node
+			BuildDir  = pwd tmp: true
+			SrcDir    = pwd tmp: false
 
 			notify_server(45)
@@ -75,5 +84,4 @@
 	}
 }
-
 //===========================================================================================================
 // Main compilation routines
@@ -145,5 +153,5 @@
 		dir (BuildDir) {
 			//Append bench results
-			sh "make --no-print-directory -C benchmark jenkins githash=${Settings.GitNewRef} arch=${Settings.Architecture} | tee ${SrcDir}/bench.json"
+			sh "${SrcDir}/benchmark/jenkins.sh ${Settings.GitNewRef} ${Settings.Architecture} ${BuildDir}/bench.json"
 		}
 	}
@@ -171,5 +179,5 @@
 
 		//Then publish the results
-		sh 'curl --silent --show-error -H \'Content-Type: application/json\' --data @bench.json https://cforall.uwaterloo.ca:8082/jenkins/publish > /dev/null || true'
+		sh 'curl --silent --show-error -H \'Content-Type: application/json\' --data @${BuildDir}/bench.json https://cforall.uwaterloo.ca:8082/jenkins/publish > /dev/null || true'
 	}
 }
@@ -181,5 +189,5 @@
 	if (!Settings || !Settings.GitOldRef || !Settings.GitNewRef) return "\nERROR retrieveing git information!\n"
 
-	sh "${SrcDir}/tools/PrettyGitLogs.sh ${BuildDir} ${Settings.GitOldRef} ${Settings.GitNewRef}"
+	sh "${SrcDir}/tools/PrettyGitLogs.sh ${SrcDir} ${BuildDir} ${Settings.GitOldRef} ${Settings.GitNewRef}"
 
 	def gitUpdate = readFile("${BuildDir}/GIT_UPDATE")
@@ -250,8 +258,10 @@
 	public String name
 	public String flags
-
-	Arch_Desc(String name, String flags) {
+	public String node
+
+	Arch_Desc(String name, String flags, String node) {
 		this.name  = name
 		this.flags = flags
+		this.node  = node
 	}
 }
@@ -292,8 +302,8 @@
 		switch( param.Architecture ) {
 			case 'x64':
-				this.Architecture = new Arch_Desc('x64', '--host=x86_64')
+				this.Architecture = new Arch_Desc('x64', '--host=x86_64', 'x64')
 			break
 			case 'x86':
-				this.Architecture = new Arch_Desc('x86', '--host=i386')
+				this.Architecture = new Arch_Desc('x86', '--host=i386', 'x86')
 			break
 			default :
@@ -371,4 +381,7 @@
 		]])
 
+	// It's unfortunate but it looks like we need to checkout the entire repo just to get the pretty git printer
+	checkout scm
+
 	final settings = new BuildSettings(params, env.BRANCH_NAME)
 
@@ -398,5 +411,5 @@
 	catch (Exception caughtError) {
 		err = caughtError //rethrow error later
-		sh 'cat *.log'
+		sh 'cat build/*.log'
 	}
 	finally {
