Index: Jenkins/FullBuild
===================================================================
--- Jenkins/FullBuild	(revision 1b8c1563ffba3b2eed932ad1dc26b5bc4fc21aeb)
+++ Jenkins/FullBuild	(revision 6003581a11630f59bb68b120bf089c79b863d629)
@@ -1,5 +1,7 @@
 #!groovy
 
-
+//===========================================================================================================
+// Main compilation routines
+//===========================================================================================================
 def push_build() {
 	//Don't use the build_stage function which outputs the compiler
@@ -23,4 +25,55 @@
 }
 
+//===========================================================================================================
+// Main loop of the compilation
+//===========================================================================================================
+node ('master'){
+	try {
+		//Prevent the build from exceeding 30 minutes
+		timeout(60) {
+
+			//Wrap build to add timestamp to command line
+			wrap([$class: 'TimestamperBuildWrapper']) {
+
+				build job: 'Cforall/master', 					\
+					parameters: [						\
+						[$class: 'BooleanParameterValue', 		\
+						  name: 'isFullBuild', 				\
+						  value: true], 					\
+						[$class: 'StringParameterValue', 		\
+						  name: 'buildArchitecture', 			\
+						  value: '64-bit']				\
+					]
+
+				//Push latest changes to do-lang repo
+				//push_build()
+			}
+		}
+	}
+
+	//If an exception is caught we need to change the status and remember to
+	//attach the build log to the email
+	catch (Exception caughtError) {
+		//rethrow error later
+		err = caughtError
+
+		//Store the result of the build log
+		currentBuild.result = "${status_prefix} FAILURE".trim()
+
+		//Send email to notify the failure
+		//promote_email(currentBuild.result)
+	}
+
+	finally {
+		//Must re-throw exception to propagate error
+		if (err) {
+			throw err
+		}
+	}
+}
+
+//===========================================================================================================
+//Routine responsible of sending the email notification once the build is completed
+//===========================================================================================================
 
 //Email notification on a full build failure
Index: Jenkinsfile
===================================================================
--- Jenkinsfile	(revision 1b8c1563ffba3b2eed932ad1dc26b5bc4fc21aeb)
+++ Jenkinsfile	(revision 6003581a11630f59bb68b120bf089c79b863d629)
@@ -2,5 +2,5 @@
 
 //===========================================================================================================
-// Main compilation routine
+// Main compilation routines
 //===========================================================================================================
 //Compilation script is done here but environnement set-up and error handling is done in main loop
@@ -83,25 +83,4 @@
 }
 
-def push_build() {
-	//Don't use the build_stage function which outputs the compiler
-	stage 'Push'
-
-		status_prefix = 'Push'
-
-		def out_dir = pwd tmp: true
-		sh "mkdir -p ${out_dir}"
-
-		//parse git logs to find what changed
-		sh "git remote > ${out_dir}/GIT_REMOTE"
-		git_remote = readFile("${out_dir}/GIT_REMOTE")
-		remoteDoLangExists = git_remote.contains("DoLang")
-
-		if( !remoteDoLangExists ) {
-			sh 'git remote add DoLang git@gitlab.do-lang.org:internal/cfa-cc.git'
-		}
-
-		sh "git push DoLang ${gitRefNewValue}:master"
-}
-
 //===========================================================================================================
 // Helper classes/variables/routines to make the status and stage name easier to use
@@ -155,5 +134,5 @@
 node ('master'){
 
-	boolean doPromoteBuild2DoLang
+	boolean doFullBuild
 	def err = null
 	def log_needed = false
@@ -176,5 +155,5 @@
 						  defaultValue: false,  					\
 						  description: 'If true, the build will be promoted to the do-lang git repository (on successful builds only)', \
-						  name: 'promoteBuild2DoLang' 					\
+						  name: 'isFullBuild' 					\
 						], 								\
 						[$class: 'ChoiceParameterDefinition',				\
@@ -186,5 +165,5 @@
 					]])
 
-				doPromoteBuild2DoLang = promoteBuild2DoLang == 'true'
+				doFullBuild = isFullBuild == 'true'
 				architectureFlag = buildArchitecture == '64-bit' ? '-m64' : (buildArchitecture == '32-bit' ? '-m32' : 'ERROR')
 
@@ -193,10 +172,10 @@
 				//Compile using gcc-4.9
 				currentCC = new CC_Desc('gcc-4.9', 'g++-4.9', 'gcc-4.9')
-				cfa_build(doPromoteBuild2DoLang, architectureFlag)
+				cfa_build(doFullBuild, architectureFlag)
 
 				//Compile latex documentation
 				doc_build()
 
-				if( doPromoteBuild2DoLang ) {
+				if( doFullBuild ) {
 					//Compile using gcc-5
 					currentCC = new CC_Desc('gcc-5', 'g++-5', 'gcc-5')
@@ -206,7 +185,4 @@
 					currentCC = new CC_Desc('gcc-6', 'g++-6', 'gcc-6')
 					cfa_build(true, architectureFlag)
-
-					//Push latest changes to do-lang repo
-					push_build()
 				}
 			}
@@ -251,27 +227,4 @@
 		email(status, log)
 	}
-}
-
-//Email notification on a full build failure
-def promote_email(String status) {
-	//Since tokenizer doesn't work, figure stuff out from the environnement variables and command line
-	//Configurations for email format
-	def email_subject = "[cforall git][PROMOTE - FAILURE]"
-	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".
-
-Check console output at ${env.BUILD_URL} to view the results.
-
-- Status --------------------------------------------------------------
-
-PROMOTE FAILURE - ${status}
-"""
-
-	def email_to = "pabuhr@uwaterloo.ca, rschlunt@uwaterloo.ca, a3moss@uwaterloo.ca, tdelisle@uwaterloo.ca, brice.dobry@huawei.com"
-
-	//send email notification
-	emailext body: email_body, subject: email_subject, to: email_to, attachLog: true
 }
 
