Add documentation trigger to build
@@ -68,72 +68,45 @@ pipeline {
checkout scm
}
}
- stage('Copy project docs') {
+ stage ('Start Docs build') {
when {
branch 'master'
+ changeset '**/*.adoc'
}
steps {
- sh 'mkdir ./tmp'
- sh "find ./ -name '*.adoc' -exec cp -prv --parents '{}' './tmp/' ';'"
+ echo 'Trigger Documentation Build'
+ build job: 'Hop/Hop-Documentation/asf-site', wait: false
}
}
- stage('Process Docs') {
+ stage('Test & Build') {
when {
branch 'master'
}
steps {
- dir('hop-doc') {
+ echo 'Test & Build'
+
+ dir("local-snapshots-dir/") {
deleteDir()
- sh 'git clone -b master https://github.com/apache/incubator-hop-docs.git .'
- sh '''
- cd ../tmp;
- for f in $(find ./ -name '*.adoc')
- do
- echo "Processing $f"
- FILEPATH=$(grep -nr "documentationPath" $f | awk -F ":" '{print $4}' | sed -e 's/^[[:space:]]*//');
- if ! [ -z "$FILEPATH" ]
- then
- mkdir -p ../hop-doc/hop-user-manual/modules/ROOT/pages$FILEPATH && cp $f ../hop-doc/hop-user-manual/modules/ROOT/pages$FILEPATH;
- fi
- done
- cd ../hop-doc
- '''
- sh 'git add .'
- sh 'git commit -m "Documentation updated to $GIT_COMMIT"'
- sh 'git push --force origin master'
+ }
+ sh "mvn $MAVEN_PARAMS -DaltDeploymentRepository=snapshot-repo::default::file:./local-snapshots-dir clean deploy"
}
+ post {
+ always {
+ junit(testResults: '**/surefire-reports/*.xml', allowEmptyResults: true)
+ junit(testResults: '**/failsafe-reports/*.xml', allowEmptyResults: true)
+ }
+ }
+ }
+ stage('Deploy'){
+ when {
+ branch 'master'
+ }
+ steps{
+ echo 'Deploying'
+ sh 'mvn -X -P deploy-snapshots wagon:upload'
}
}
- // stage('Test & Build') {
- // when {
- // branch 'master'
- // }
- // steps {
- // echo 'Test & Build'
-
- // dir("local-snapshots-dir/") {
- // deleteDir()
- // }
-
- // sh "mvn $MAVEN_PARAMS -DaltDeploymentRepository=snapshot-repo::default::file:./local-snapshots-dir clean deploy"
- // }
- // post {
- // always {
- // junit(testResults: '**/surefire-reports/*.xml', allowEmptyResults: true)
- // junit(testResults: '**/failsafe-reports/*.xml', allowEmptyResults: true)
- // }
- // }
- // }
- // stage('Deploy'){
- // when {
- // branch 'master'
- // }
- // steps{
- // echo 'Deploying'
- // sh 'mvn -X -P deploy-snapshots wagon:upload'
- // }
- // }
}
post {
