cleanup workspace

Signed-off-by: olivier lamy <olamy@apache.org>
diff --git a/vars/asfStandardBuild.groovy b/vars/asfStandardBuild.groovy
index db08a97..df60d6d 100644
--- a/vars/asfStandardBuild.groovy
+++ b/vars/asfStandardBuild.groovy
@@ -51,8 +51,30 @@
         }
       }
     }
+    post {
+      always {
+        cleanWs deleteDirs: true, notFailBuild: true, patterns: [[pattern: '.repository', type: 'EXCLUDE']]
+      }
+      unstable {
+        script{
+          asfStandardBuild.notifyBuild( "Unstable Build ")
+        }
+      }
+      failure {
+        script{
+          asfStandardBuild.notifyBuild( "Error in redback core build ")
+        }
+      }
+      success {
+        script {
+          def previousResult = currentBuild.previousBuild?.result
+          if (previousResult && !currentBuild.resultIsWorseOrEqualTo( previousResult ) ) {
+            asfStandardBuild.notifyBuild( "Fixed" )
+          }
+        }
+      }
+    }
   }
-
 }
 
 /**