rsemcm/Jenkinsfile

32 lines
1.1 KiB
Plaintext
Raw Normal View History

2022-05-12 07:24:29 +00:00
pipeline {
agent any
stages {
2022-05-12 07:47:20 +00:00
stage("cleanup") {
steps {
cleanWs(patterns: [[pattern: 'publish/**', type: 'INCLUDE']])
2022-05-12 07:50:45 +00:00
cleanWs(patterns: [[pattern: 'world/', type: 'INCLUDE']])
2022-05-12 07:47:20 +00:00
}
}
2022-05-12 07:24:29 +00:00
stage("server launch test") {
steps {
dir('server') {
sh 'echo "eula=true" > eula.txt'
sh "chmod u+x ./run.sh"
2022-05-12 07:45:40 +00:00
sh 'echo "stop" | ./run.sh'
}
2022-05-12 07:24:29 +00:00
logParser failBuildOnError: true, projectRulePath: 'Jenkinsparse', parsingRulesPath: 'Jenkinsparse', showGraphs: true, unstableOnWarning: true, useProjectRule: true
sh 'git reset --hard'
}
}
stage("publish") {
when {
branch "**/master"
}
steps {
zip archive: true, dir: 'curseforge', exclude: '', glob: '', zipFile: 'publish/RSEMCS.zip'
zip archive: true, dir: 'server', exclude: '', glob: '', zipFile: 'publish/RSEMCS_server.zip'
fingerprint 'publish/*.zip'
}
}
}
2022-05-12 07:24:29 +00:00
}