Index: Jenkinsfile
===================================================================
--- Jenkinsfile	(revision d37fc7bbd0a0c04cb812a5bc139b021546c5e511)
+++ Jenkinsfile	(revision e8a22a77f64fbee279c3debe83c7ae1e5690a825)
@@ -13,38 +13,39 @@
 	//configure the conpilation
 	try {
+		sh 'git clean -dfq'
 		sh 'make maintainer-clean > /dev/null'
-		sh 'CC=gcc-4.9 CXX=g++-4.9 ./configure'
-		sh 'dfgdfg make -j 8'
-		echo "Success"
+		sh 'CC=gcc-4.9 CXX=g++-4.9 ./configure > /dev/null'
+		sh 'dfsdfs make -j 8'
+		email("SUCCESS")
 	} catch (Exception e) {
-		echo "Failed"
+		email("SUCCESS")
+		throw e;
 	}
 }
 
-// stage 'Notify'
-// node {
-// 	//Since tokenizer doesn't work, figure stuff out from the environnement variables and command line
-// 	//Configurations for email format
-// 	def project_name = (env.JOB_NAME =~ /(.+)\/.+/)[0][1].toLowerCase()
-//
-// 	def email_subject = "[${project_name} git] - branch ${env.BRANCH_NAME} - Build # ${env.BUILD_NUMBER} - BUILD_STATUS!"
-// 	def email_body = """This is an automated email from the Jenkins build machine. It was
-// 	generated because of a git hooks/post-receive script following
-// 	a ref change was pushed to the repository containing
-// 	the project "UNNAMED PROJECT".
-//
-// 	The branch ${env.BRANCH_NAME} has been updated
-// 	       via  GIT_COMMIT (commit)
-// 	      from  GIT_PREVIOUS_COMMIT (commit)
-//
-// 	Those revisions listed above that are new to this repository have
-// 	not appeared on any other notification email; so we list those
-// 	revisions in full, below.
-//
-// 	Check console output at ${env.BUILD_URL} to view the results."""
-//
-// 	def email_to = 'tdelisle@uwaterloo.ca'
-//
-// 	//send email notification
-// 	emailext body: email_body, subject: email_subject, to: email_to, attachLog: true
-// }
+def email(String status) {
+	//Since tokenizer doesn't work, figure stuff out from the environnement variables and command line
+	//Configurations for email format
+	def project_name = (env.JOB_NAME =~ /(.+)\/.+/)[0][1].toLowerCase()
+
+	def email_subject = "[${project_name} git] - branch ${env.BRANCH_NAME} - Build # ${env.BUILD_NUMBER} - ${status}!"
+	def email_body = """This is an automated email from the Jenkins build machine. It was
+	generated because of a git hooks/post-receive script following
+	a ref change was pushed to the repository containing
+	the project "UNNAMED PROJECT".
+
+	The branch ${env.BRANCH_NAME} has been updated
+	       via  GIT_COMMIT (commit)
+	      from  GIT_PREVIOUS_COMMIT (commit)
+
+	Those revisions listed above that are new to this repository have
+	not appeared on any other notification email; so we list those
+	revisions in full, below.
+
+	Check console output at ${env.BUILD_URL} to view the results."""
+
+	def email_to = 'tdelisle@uwaterloo.ca'
+
+	//send email notification
+	emailext body: email_body, subject: email_subject, to: email_to, attachLog: true
+}
