Deployment now deploys generated dynmap files.

This commit is contained in:
Harrison Deng 2022-05-20 15:58:47 -05:00
parent bedfb090b1
commit 17393bc297

29
Jenkinsfile vendored
View File

@ -21,6 +21,20 @@ pipeline {
fileOperations([fileDeleteOperation(excludes: '', includes: 'mods/DynmapBlockScan.jar')])
}
}
stage("deploy") {
when {
branch '**/master'
}
steps {
sshagent(['ce4c701d-098c-4706-8f32-c0af996a7769']) {
pwsh "ssh -o StrictHostKeyChecking=no gamehost@entertainment 'systemctl --user stop rsemcs'"
pwsh "rsync -a --update --filter=':- .gitignore' --exclude=./mods/ --exclude=./config/ ./** gamehost@entertainment:/home/gamehost/mcserver/"
pwsh "rsync -a --update --filter=':- .gitignore' --delete ./mods/ gamehost@entertainment:/home/gamehost/mcserver/mods"
pwsh "rsync -a --update --filter=':- .gitignore' --delete ./config gamehost@entertainment:/home/gamehost/mcserver/config"
pwsh "ssh gamehost@entertainment 'systemctl --user start rsemcs'"
}
}
}
stage("cleanup") {
when {
not {
@ -29,21 +43,6 @@ pipeline {
}
steps {
pwsh "git clean -dfX"
fileOperations([folderDeleteOperation('world')])
}
}
stage("deploy") {
when {
branch '**/master'
}
steps {
sshagent(['ce4c701d-098c-4706-8f32-c0af996a7769']) {
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"
pwsh "rsync -a --update --delete --exclude '*.json' ./* gamehost@entertainment:/home/gamehost/mcserver/"
pwsh "ssh gamehost@entertainment 'systemctl --user start rsemcs'"
}
}
}
}