Deployment now deploys generated dynmap files.
This commit is contained in:
parent
bedfb090b1
commit
17393bc297
29
Jenkinsfile
vendored
29
Jenkinsfile
vendored
@ -21,6 +21,20 @@ pipeline {
|
|||||||
fileOperations([fileDeleteOperation(excludes: '', includes: 'mods/DynmapBlockScan.jar')])
|
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") {
|
stage("cleanup") {
|
||||||
when {
|
when {
|
||||||
not {
|
not {
|
||||||
@ -29,21 +43,6 @@ pipeline {
|
|||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
pwsh "git clean -dfX"
|
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'"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user