2022-01-08 14:23:08 -06:00
|
|
|
pipeline {
|
2022-05-16 20:21:44 -05:00
|
|
|
agent {
|
|
|
|
label 'linux && increased_mem'
|
|
|
|
}
|
2022-05-16 14:59:53 -05:00
|
|
|
options {
|
|
|
|
disableConcurrentBuilds()
|
|
|
|
}
|
2022-05-16 20:21:44 -05:00
|
|
|
|
2022-01-08 14:23:08 -06:00
|
|
|
stages {
|
2022-05-16 00:42:40 -05:00
|
|
|
stage("run server") {
|
|
|
|
when {
|
|
|
|
not {
|
|
|
|
triggeredBy "BuildUpstreamCause"
|
|
|
|
}
|
|
|
|
}
|
2022-05-12 04:33:18 -05:00
|
|
|
steps {
|
|
|
|
sh 'echo "eula=true" > eula.txt'
|
2022-05-13 16:50:40 -05:00
|
|
|
sh "chmod u+x ./run_trial.sh"
|
2022-05-13 04:23:50 -05:00
|
|
|
sh "curl -o mods/DynmapBlockScan.jar -LJR https://github.com/webbukkit/DynmapBlockScan/releases/download/v3.4-beta-1/DynmapBlockScan-3.4-beta-1-forge-1.18.jar"
|
2022-05-16 15:01:23 -05:00
|
|
|
sh 'echo "stop" | ./run_trial.sh'
|
2022-05-12 04:33:18 -05:00
|
|
|
logParser failBuildOnError: true, projectRulePath: 'Jenkinsparse', parsingRulesPath: 'Jenkinsparse', showGraphs: true, unstableOnWarning: true, useProjectRule: true
|
2022-05-13 04:23:50 -05:00
|
|
|
sh "rm mods/DynmapBlockScan.jar"
|
2022-01-20 03:03:44 -06:00
|
|
|
}
|
2022-05-12 04:33:18 -05:00
|
|
|
}
|
2022-05-16 00:42:40 -05:00
|
|
|
stage("cleanup") {
|
|
|
|
when {
|
|
|
|
not {
|
|
|
|
triggeredBy "BuildUpstreamCause"
|
|
|
|
}
|
|
|
|
}
|
2022-05-13 15:37:09 -05:00
|
|
|
steps {
|
|
|
|
sh "git clean -dfX"
|
|
|
|
sh "rm -rf world"
|
|
|
|
}
|
|
|
|
}
|
2022-05-12 04:33:18 -05:00
|
|
|
stage("deploy") {
|
2022-05-12 04:34:05 -05:00
|
|
|
when {
|
|
|
|
branch '**/master'
|
|
|
|
}
|
2022-01-20 03:00:47 -06:00
|
|
|
steps {
|
2022-05-12 04:33:18 -05:00
|
|
|
sshagent(['ce4c701d-098c-4706-8f32-c0af996a7769']) {
|
2022-05-12 16:34:02 -05:00
|
|
|
sh "ssh -o StrictHostKeyChecking=no gamehost@entertainment 'systemctl --user stop rsemcs'"
|
2022-05-13 14:57:42 -05:00
|
|
|
sh "rsync -a --update --exclude ./mods/ --exclude ./config/ ./** gamehost@entertainment:/home/gamehost/mcserver/"
|
|
|
|
sh "rsync -a --update --delete ./mods/ gamehost@entertainment:/home/gamehost/mcserver/mods"
|
|
|
|
sh "rsync -a --update --delete ./config/ gamehost@entertainment:/home/gamehost/mcserver/config"
|
2022-05-12 16:15:43 -05:00
|
|
|
sh "ssh gamehost@entertainment 'systemctl --user start rsemcs'"
|
2022-01-20 03:00:47 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-01-08 14:23:08 -06:00
|
|
|
}
|
2022-05-12 04:33:18 -05:00
|
|
|
}
|