This is an automated email from the ASF dual-hosted git repository.

skygo pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/incubator-netbeans-mavenutils.git

commit 0ec09b4b7ef50082f10dcaa4b4e2182b38116a07
Author: Eric Barboni <[email protected]>
AuthorDate: Sat Dec 1 12:19:05 2018 +0100

    Generate zip for website
---
 Jenkinsfile-site.groovy | 29 ++++++++++-------------------
 1 file changed, 10 insertions(+), 19 deletions(-)

diff --git a/Jenkinsfile-site.groovy b/Jenkinsfile-site.groovy
index 07aa9af..e6a90cc 100644
--- a/Jenkinsfile-site.groovy
+++ b/Jenkinsfile-site.groovy
@@ -23,20 +23,17 @@ pipeline {
         maven 'Maven 3.3.9' 
         jdk 'jdk8' 
     }
-    //label 'git-websites'
     stages {
         stage('SCM operation'){
-            agent {label 'git-websites'}
+            agent {label 'ubuntu'}
             steps {
                 checkout([$class: 'GitSCM', branches: [[name: '*/master']], 
doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CloneOption', 
noTags: true, reference: '', shallow: true], [$class: 'MessageExclusion', 
excludedMessage: 'Automated site publishing.*'], [$class: 
'RelativeTargetDirectory', relativeTargetDir: 'master-branch']], submoduleCfg: 
[], userRemoteConfigs: [[url: 
'https://github.com/apache/incubator-netbeans-mavenutils/']]])
 
-                sh 'rm -rf asf-site-branch'
-                //sh 'mkdir asf-site-branch'
-                checkout([$class: 'GitSCM', branches: [[name: '*/asf-site']], 
doGenerateSubmoduleConfigurations: false, extensions: [[$class: 
'MessageExclusion', excludedMessage: 'Automated site publishing.*'], [$class: 
'RelativeTargetDirectory', relativeTargetDir: 'asf-site-branch']], 
submoduleCfg: [], userRemoteConfigs: [[credentialsId: 
'9b041bd0-aea9-4498-a576-9eeb771411dd', url: 
'https://gitbox.apache.org/repos/asf//incubator-netbeans-mavenutils/']]])
+                sh 'rm -rf stagedsite'
             }
         }
         stage('Build Site'){ 
-            agent {label 'git-websites'}
+            agent {label 'ubuntu'}
             steps {
                 
                 script {
@@ -45,7 +42,7 @@ pipeline {
                     for (String mvnproject in mvnfoldersforsite) {
                         dir('master-branch/'+mvnproject) {
                             sh "mvn clean install site 
-Dmaven.repo.local=${BASEDIR}/.repository"
-                            sh "mv target/site 
${BASEDIR}/asf-site-branch/${mvnproject}/"
+                            sh "mv target/site 
${BASEDIR}/stagedsite/${mvnproject}/"
                         }
                     }
                 }
@@ -54,17 +51,11 @@ pipeline {
             }
         }
         stage('Publish Site'){ 
-            agent {label 'git-websites'}
+            agent {label 'ubuntu'}
             steps {
-                dir('asf-site-branch') {
-                    echo 'Adding content...'
-                    sshagent (credentials: 
['9b041bd0-aea9-4498-a576-9eeb771411dd']) {
-                        sh 'git add -v .'
-                        sh 'git commit -v -m "Automated site publishing by 
Jenkins build ${BUILD_NUMBER}'
-                        sh 'git push -v origin asf-site'
-                    }                 
-                }
-            }
-        }
+                zip zipFile:'mavenusite.zip',archive:false,dir:'stagedsite'
+                archiveArtifacts artifacts:'mavenusite.zip'
+                  }
+        }       
     }
-}
\ No newline at end of file
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to