rsemcm/Jenkinsfile

36 lines
1.3 KiB
Groovy

pipeline {
agent {
label 'linux && increased_mem'
}
options {
disableConcurrentBuilds()
}
stages {
stage("run server") {
steps {
dir('server') {
sh 'echo "eula=true" > eula.txt'
sh "chmod u+x ./run.sh"
sh 'echo "stop" | ./run.sh'
}
logParser failBuildOnError: true, projectRulePath: 'Jenkinsparse', parsingRulesPath: 'Jenkinsparse', showGraphs: true, unstableOnWarning: true, useProjectRule: true
}
}
stage("cleanup") {
steps {
sh "git clean -dfX"
sh "rm -rf server/world"
}
}
stage("publish") {
when {
branch "**/master"
}
steps {
publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false, reportDir: 'curseforge', 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'
}
}
}
}