Index: Jenkinsfile
===================================================================
--- Jenkinsfile	(revision 7c0ef42b5430ae5624a729b38094facc1cf10bcc)
+++ Jenkinsfile	(revision 620dd2b27df753a484d739bda4b2f47ade333486)
@@ -97,7 +97,5 @@
 	//parse git logs to find what changed
 	gitRefName = env.BRANCH_NAME
-	// dir("../${gitRefName}@script") {
 	sh "git reflog > ${out_dir}/GIT_COMMIT"
-	// }
 	git_reflog = readFile("${out_dir}/GIT_COMMIT")
 	gitRefOldValue = (git_reflog =~ /moving from (.+) to (.+)/)[0][1]
@@ -172,7 +170,7 @@
 }
 
-def build_stage(String name) {
+def build_stage(String name, Closure block ) {
 	stage_name = name
-	stage name
+	stage(name, block)
 }
 
@@ -247,5 +245,5 @@
 //Compilation script is done here but environnement set-up and error handling is done in main loop
 def checkout() {
-	build_stage'Checkout'
+	build_stage('Checkout') {
 		//checkout the source code and clean the repo
 		checkout scm
@@ -256,8 +254,9 @@
 		//Reset the git repo so no local changes persist
 		sh 'git reset --hard'
+	}
 }
 
 def build() {
-	build_stage'Build'
+	build_stage('Build') {
 	
 		def install_dir = pwd tmp: true
@@ -271,8 +270,9 @@
 		//Compile the project
 		sh 'make -j 8 --no-print-directory V=0 install'
+	}
 }
 
 def test() {
-	build_stage'Test'
+	build_stage('Test') {
 
 		//Run the tests from the tests directory
@@ -284,8 +284,9 @@
 			sh 'make -C src/tests'
 		}
+	}
 }
 
 def benchmark() {
-	build_stage'Benchmark'
+	build_stage('Benchmark') {
 
 		if( !do_benchmark ) return
@@ -296,15 +297,17 @@
 		//Append bench results
 		sh 'make -C src/benchmark --no-print-directory csv-data >> bench.csv'
+	}
 }
 
 def clean() {
-	build_stage'Cleanup'
+	build_stage('Cleanup') {
 
 		//do a maintainer-clean to make sure we need to remake from scratch
 		sh 'make maintainer-clean > /dev/null'
+	}
 }
 
 def build_doc() {
-	build_stage'Documentation'
+	build_stage('Documentation') {
 
 		if( !do_doc ) return
@@ -317,8 +320,9 @@
 			make_doc()
 		}
+	}
 }
 
 def publish() {
-	build_stage'Publish'
+	build_stage('Publish') {
 
 		if( !do_publish ) return
@@ -326,4 +330,5 @@
 		//Then publish the results
 		sh 'curl --silent --data @bench.csv http://plg2:8082/jenkins/publish > /dev/null || true'
+	}
 }
 
