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:24:29 +00:00
|
|
|
stage("server launch test") {
|
|
|
|
steps {
|
2022-05-12 07:28:07 +00:00
|
|
|
dir('server') {
|
2022-05-12 07:36:51 +00:00
|
|
|
sh 'echo "eula=true" > eula.txt'
|
2022-05-12 07:33:12 +00:00
|
|
|
sh "chmod u+x ./run.sh"
|
2022-05-12 07:54:30 +00:00
|
|
|
lock('Port 25565') {
|
|
|
|
sh 'echo "stop" | ./run.sh'
|
|
|
|
}
|
2022-05-12 07:28:07 +00:00
|
|
|
}
|
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") {
|
|
|
|
steps {
|
2022-05-12 08:25:35 +00:00
|
|
|
sh "git clean -dfX"
|
2022-05-13 02:03:26 +00:00
|
|
|
sh "rm -rf server/world"
|
2022-05-12 09:12:35 +00: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 07:24:29 +00:00
|
|
|
}
|
|
|
|
}
|
2022-05-12 22:04:53 +00:00
|
|
|
stage("build downstream") {
|
2022-05-13 02:03:26 +00:00
|
|
|
when {
|
|
|
|
branch '**/master'
|
|
|
|
}
|
2022-05-12 22:04:53 +00:00
|
|
|
steps {
|
2022-05-13 04:03:14 +00:00
|
|
|
build wait: false, job: '/ydeng/rsemcs/develop'
|
2022-05-12 22:04:53 +00:00
|
|
|
}
|
|
|
|
}
|
2022-05-12 07:28:07 +00:00
|
|
|
}
|
2022-05-12 07:24:29 +00:00
|
|
|
}
|