pipeline { agent any stages { stage("cleanup") { steps { cleanWs(patterns: [[pattern: 'publish/**', type: 'INCLUDE']]) } } stage("server trial") { steps { dir('server') { sh 'echo "eula=true" > eula.txt' sh "chmod u+x ./run.sh" lock('Port 25565') { sh 'echo "stop" | ./run.sh' } } logParser failBuildOnError: true, projectRulePath: 'Jenkinsparse', parsingRulesPath: 'Jenkinsparse', showGraphs: true, unstableOnWarning: true, useProjectRule: true sh 'git reset --hard' } } stage("publish") { steps { sh "git clean -dfX" sh "rm -rf server/world" publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: true, reportDir: '', reportFiles: 'modlist.html', reportName: 'Mod list', reportTitles: '']) zip archive: true, dir: 'curseforge', exclude: '', glob: '', overwrite: true, zipFile: 'publish/RSEMCM.zip' zip archive: true, dir: 'server', exclude: '', glob: '', overwrite: true, zipFile: 'publish/RSEMCM_server.zip' } } } }