Index: Jenkinsfile
===================================================================
--- Jenkinsfile	(revision d21dd3cbb46b3726b534dc8eac73c005e1caeda8)
+++ Jenkinsfile	(revision 27b1ca17f81ccc20c840eef940088ae8724aaa3d)
@@ -3,6 +3,6 @@
 import groovy.transform.Field
 
-// For skipping stages
-import org.jenkinsci.plugins.pipeline.modeldefinition.Utils
+import static Jenkins.tools.build_stage as build_stage
+import Jenkins.tools
 
 //===========================================================================================================
@@ -15,5 +15,4 @@
 	SrcDir    = pwd tmp: false
 	Settings  = null
-	StageName = ''
 
 	// Local variables
@@ -66,5 +65,5 @@
 
 		//Store the result of the build log
-		currentBuild.result = "${StageName} FAILURE".trim()
+		currentBuild.result = "${tools.StageName} FAILURE".trim()
 	}
 
@@ -517,14 +516,4 @@
 }
 
-def build_stage(String name, boolean run, Closure block ) {
-	StageName = name
-	echo " -------- ${StageName} -------- "
-	if(run) {
-		stage(name, block)
-	} else {
-		stage(name) { Utils.markStageSkippedForConditional(STAGE_NAME) }
-	}
-}
-
 def make_doc() {
 	def err = null
