merge conflict
diff --git a/Jenkinsfile-site.groovy b/Jenkinsfile-site.groovy
index 6001430..2d2db9c 100644
--- a/Jenkinsfile-site.groovy
+++ b/Jenkinsfile-site.groovy
@@ -23,16 +23,13 @@
maven 'Maven 3.3.9'
jdk 'JDK 1.8 (latest)'
}
- //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('Prepare Publish Site'){
@@ -52,7 +49,7 @@
}
}
stage('Build Site'){
- agent {label 'git-websites'}
+ agent {label 'ubuntu'}
steps {
// build site skin
script {
@@ -71,7 +68,7 @@
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/content/mavenutils/${mvnproject}/"
+ sh "mv target/site ${BASEDIR}/stagedsite/${mvnproject}/"
}
}
}
@@ -80,17 +77,11 @@
}
}
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 by mavenutils-${BUILD_NUMBER}"'
- sh 'git push -v origin asf-site'
- }
- }
- }
- }
+ zip zipFile:'mavenusite.zip',archive:false,dir:'stagedsite'
+ archiveArtifacts artifacts:'mavenusite.zip'
+ }
+ }
}
}