2022-05-12 02:24:29 -05:00
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
stages {
|
2022-05-12 02:47:20 -05:00
|
|
|
stage("cleanup") {
|
|
|
|
steps {
|
|
|
|
cleanWs(patterns: [[pattern: 'publish/**', type: 'INCLUDE']])
|
|
|
|
}
|
|
|
|
}
|
2022-05-12 02:24:29 -05:00
|
|
|
stage("server launch test") {
|
|
|
|
steps {
|
2022-05-12 02:28:07 -05:00
|
|
|
dir('server') {
|
2022-05-12 02:36:51 -05:00
|
|
|
sh 'echo "eula=true" > eula.txt'
|
2022-05-12 02:33:12 -05:00
|
|
|
sh "chmod u+x ./run.sh"
|
2022-05-12 02:54:30 -05:00
|
|
|
lock('Port 25565') {
|
|
|
|
sh 'echo "stop" | ./run.sh'
|
|
|
|
}
|
2022-05-12 02:28:07 -05:00
|
|
|
}
|
2022-05-12 02:24:29 -05:00
|
|
|
logParser failBuildOnError: true, projectRulePath: 'Jenkinsparse', parsingRulesPath: 'Jenkinsparse', showGraphs: true, unstableOnWarning: true, useProjectRule: true
|
|
|
|
sh 'git reset --hard'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("publish") {
|
|
|
|
steps {
|
2022-05-12 03:25:35 -05:00
|
|
|
sh "git clean -dfX"
|
2022-05-12 04:02:07 -05:00
|
|
|
sh "rm -r server/world"
|
2022-05-12 04:12:35 -05:00
|
|
|
zip archive: true, dir: 'curseforge', exclude: '', glob: '', overwrite: true, zipFile: 'publish/RSEMCS.zip'
|
|
|
|
zip archive: true, dir: 'server', exclude: '', glob: '', overwrite: true, zipFile: 'publish/RSEMCS_server.zip'
|
2022-05-12 02:24:29 -05:00
|
|
|
}
|
|
|
|
}
|
2022-05-12 02:28:07 -05:00
|
|
|
}
|
2022-05-12 02:24:29 -05:00
|
|
|
}
|