pipeline { agent { label 'ubuntu' } tools { maven 'maven_3.6.3' jdk 'jdk_18_latest' } stages { stage('build') { steps { script { // Checkout branch with generated content sh """ if [ ! -d clerezza.git ]; then git clone --depth 1 --branch master https://gitbox.apache.org/repos/asf/clerezza.git clerezza.git fi cd clerezza.git git pull mvn -DskipTests -Psite-build install site -pl '!tutorial' cd .. cp -r clerezza.git/target/site/apidocs/* production/apidocs/latest svn status cd production/apidocs/latest svn add * --force svn ci -m "site-build: update production/apidocs/latest" cd ../../.. svn status """ } } } } }