Revert "Reset jenkinsfile to last working version"

This reverts commit ef304c39039a78209bef27546eedcedd65375b99.


Project: http://git-wip-us.apache.org/repos/asf/logging-log4net/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4net/commit/0f58a56c
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4net/tree/0f58a56c
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4net/diff/0f58a56c

Branch: refs/heads/master
Commit: 0f58a56c576f0415fb59442b2259ee95fe4bb54d
Parents: ef304c3
Author: Dominik Psenner <[email protected]>
Authored: Sat Jul 1 04:02:32 2017 +0200
Committer: Dominik Psenner <[email protected]>
Committed: Sat Jul 1 04:02:32 2017 +0200

----------------------------------------------------------------------
 Jenkinsfile | 68 +++++++++++++++++++++++++++++++++++++-------------------
 1 file changed, 45 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/0f58a56c/Jenkinsfile
----------------------------------------------------------------------
diff --git a/Jenkinsfile b/Jenkinsfile
index 60577e5..c0d3848 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -17,30 +17,52 @@
  * under the License.
  */
 
-node('Windows')
-{
-       // TODO: find a better way to determine nant latest
-       def NANT_LATEST="F:\\jenkins\\tools\\nant\\nant-0.92\\bin"
-       dir('build')
-       {
-               stage('Checkout')
-               {
-                       checkout scm
-               }
-
-               stage('Build')
-               {
-                       withEnv(["Path+NANT=$NANT_LATEST"])
-                       {
-                               bat "NAnt.exe -buildfile:log4net.build"
-                       }
+pipeline {
+       options {
+               timeout(time: 1, unit: 'HOURS')
+       }
+       agent { label 'Windows' }
+       environment {
+               // TODO: find a better way to determine nant latest
+               NAnt = 'F:\\jenkins\\tools\\nant\\nant-0.92\\bin\\NAnt.exe'
+       }
+       node {
+               stages {
+                       stage('Checkout') {
+                               steps {
+                                       checkout scm
+                               }
+                       }
+                       stage('Build') {
+                               steps {
+                                       bat "${NAnt} -buildfile:log4net.build"
+                               }
+                       }
+                       stage('Test on Windows') {
+                               steps {
+                                       bat "${NAnt} 
-buildfile:tests\\nant.build"
+                               }
+                       }
+                       stage('Build-Site') {
+                               steps {
+                                       bat "${NAnt} -buildfile:log4net.build 
generate-site"
+                               }
+                       }
+                       stage('Deploy-Site') {
+                               when {
+                                       branch 'master'
+                               }
+                               steps {
+                                       echo 'This is a placeholder for the 
deployment of the site'
+                               }
+                       }
                }
-               stage('Test')
-               {
-                       withEnv(["Path+NANT=$NANT_LATEST"])
-                       {
-                               bat "NAnt.exe -buildfile:tests\\nant.build"
-                       }
+       }
+       post {
+               failure {
+                       echo 'Failed build'
+                       // TODO: send email as soon as the entire building is 
more stable
+                       //step([$class: 'Mailer', notifyEveryUnstableBuild: 
true, recipients: '[email protected]'])
                }
        }
 }

Reply via email to