2022-01-08 20:23:08 +00:00
|
|
|
pipeline {
|
2022-05-17 01:21:44 +00:00
|
|
|
agent {
|
2022-05-17 17:31:07 +00:00
|
|
|
label 'increased_mem'
|
2022-05-17 01:21:44 +00:00
|
|
|
}
|
2022-05-16 19:59:53 +00:00
|
|
|
options {
|
|
|
|
disableConcurrentBuilds()
|
|
|
|
}
|
2022-05-17 01:21:44 +00:00
|
|
|
|
2022-01-08 20:23:08 +00:00
|
|
|
stages {
|
2022-05-16 05:42:40 +00:00
|
|
|
stage("run server") {
|
|
|
|
when {
|
|
|
|
not {
|
|
|
|
triggeredBy "BuildUpstreamCause"
|
|
|
|
}
|
|
|
|
}
|
2022-05-12 09:33:18 +00:00
|
|
|
steps {
|
2022-05-17 17:30:19 +00:00
|
|
|
fileOperations([fileCreateOperation(fileContent: 'eula=true', fileName: 'eula.txt')])
|
|
|
|
fileOperations([fileDownloadOperation(password: '', proxyHost: '', proxyPort: '', targetFileName: 'DynmapBlockScan.jar', targetLocation: 'mods/', url: 'https://github.com/webbukkit/DynmapBlockScan/releases/download/v3.4-beta-1/DynmapBlockScan-3.4-beta-1-forge-1.18.jar', userName: '')])
|
2022-05-17 18:04:59 +00:00
|
|
|
pwsh returnStatus: true, script: 'echo "stop" | java -Xmx4G @libraries/net/minecraftforge/forge/1.18.2-40.1.19/unix_args.txt'
|
2022-05-12 09:33:18 +00:00
|
|
|
logParser failBuildOnError: true, projectRulePath: 'Jenkinsparse', parsingRulesPath: 'Jenkinsparse', showGraphs: true, unstableOnWarning: true, useProjectRule: true
|
2022-05-17 17:30:19 +00:00
|
|
|
fileOperations([fileDeleteOperation(excludes: '', includes: 'mods/DynmapBlockScan.jar')])
|
2022-01-20 09:03:44 +00:00
|
|
|
}
|
2022-05-12 09:33:18 +00:00
|
|
|
}
|
2022-05-16 05:42:40 +00:00
|
|
|
stage("cleanup") {
|
|
|
|
when {
|
|
|
|
not {
|
|
|
|
triggeredBy "BuildUpstreamCause"
|
|
|
|
}
|
|
|
|
}
|
2022-05-13 20:37:09 +00:00
|
|
|
steps {
|
2022-05-17 17:30:19 +00:00
|
|
|
pwsh "git clean -dfX"
|
2022-05-17 18:04:59 +00:00
|
|
|
fileOperations([folderDeleteOperation('world')])
|
2022-05-13 20:37:09 +00:00
|
|
|
}
|
|
|
|
}
|
2022-05-12 09:33:18 +00:00
|
|
|
stage("deploy") {
|
2022-05-12 09:34:05 +00:00
|
|
|
when {
|
|
|
|
branch '**/master'
|
|
|
|
}
|
2022-01-20 09:00:47 +00:00
|
|
|
steps {
|
2022-05-12 09:33:18 +00:00
|
|
|
sshagent(['ce4c701d-098c-4706-8f32-c0af996a7769']) {
|
2022-05-17 17:30:19 +00:00
|
|
|
pwsh "ssh -o StrictHostKeyChecking=no gamehost@entertainment 'systemctl --user stop rsemcs'"
|
|
|
|
pwsh "rsync -a --update --exclude ./mods/ --exclude ./config/ ./** gamehost@entertainment:/home/gamehost/mcserver/"
|
|
|
|
pwsh "rsync -a --update --delete ./mods/ gamehost@entertainment:/home/gamehost/mcserver/mods"
|
2022-05-18 02:05:01 +00:00
|
|
|
pwsh "rsync -a --update --delete --exclude '*.json' ./* gamehost@entertainment:/home/gamehost/mcserver/"
|
2022-05-17 17:30:19 +00:00
|
|
|
pwsh "ssh gamehost@entertainment 'systemctl --user start rsemcs'"
|
2022-01-20 09:00:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-01-08 20:23:08 +00:00
|
|
|
}
|
2022-05-12 09:33:18 +00:00
|
|
|
}
|