Index: Jenkinsfile
===================================================================
--- Jenkinsfile	(revision c9986e8ce1c5d541ae715cae56c2d14af37f1275)
+++ Jenkinsfile	(revision a235d0974d4f40c2b75d2ed84d111e0ff8df61a4)
@@ -33,4 +33,11 @@
 		//do a maintainer-clean to make sure we need to remake from scratch
 		sh 'make maintainer-clean > /dev/null'
+}
+
+def push_build() {
+	build_stage 'Push'
+
+		sh 'git remote add DoLang git@gitlab.do-lang.org:internal/cfa-cc.git'
+		sh 'git push DoLang master'
 }
 
@@ -120,4 +127,7 @@
 				cfa_build()
 
+				if(promote_build) {
+					push_build()
+				}
 			}
 		}
@@ -139,5 +149,5 @@
 	finally {
 		//Send email with final results
-		email(currentBuild.result, log_needed)
+		notify_result(promote_build, err != null, currentBuild.result, log_needed)
 
 		/* Must re-throw exception to propagate error */
@@ -151,4 +161,39 @@
 //Routine responsible of sending the email notification once the build is completed
 //===========================================================================================================
+def promote_email(boolean promote, boolean success, String status, boolean log) {
+	if(promote)	{
+		if( !success ) {
+			promote_email(status)
+		}
+	}
+	else {
+		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
+}
+
+//Standard build email notification
 def email(String status, boolean log) {
 	//Since tokenizer doesn't work, figure stuff out from the environnement variables and command line
@@ -156,5 +201,5 @@
 	def project_name = (env.JOB_NAME =~ /(.+)\/.+/)[0][1].toLowerCase()
 
-	sh "git rev-list --format=short ${gitRefOldValue}..${gitRefNewValue} > GIT_LOG"
+	sh "git rev-list --format=short ${gitRefOldValue}...${gitRefNewValue} > GIT_LOG"
 	def gitLog = readFile('GIT_LOG')
 
@@ -169,6 +214,6 @@
 
 The branch ${env.BRANCH_NAME} has been updated.
-	 via  ${gitRefOldValue} (commit)
-	from  ${gitRefNewValue} (commit)
+   via  ${gitRefOldValue} (commit)
+  from  ${gitRefNewValue} (commit)
 
 Check console output at ${env.BUILD_URL} to view the results.
