rsemcm/Jenkinsfile
2022-05-16 01:10:16 -05:00

41 lines
1.4 KiB
Groovy

pipeline {
agent any
stages {
stage("run server") {
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
}
}
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'
}
}
stage("build downstream") {
when {
branch "**/master"
}
steps {
build '../rsemcs/develop'
}
}
}
}