Added cleanup stage.

This commit is contained in:
Harrison Deng 2022-05-13 15:37:09 -05:00
parent 01df79d2ee
commit 0b170d8c09

13
Jenkinsfile vendored
View File

@ -2,11 +2,6 @@ pipeline {
agent any
stages {
stage("server trial") {
when {
not {
branch '**/sync-modpack'
}
}
steps {
sh 'echo "eula=true" > eula.txt'
sh "chmod u+x ./run.sh"
@ -18,13 +13,17 @@ pipeline {
sh "rm mods/DynmapBlockScan.jar"
}
}
stage("Cleanup") {
steps {
sh "git clean -dfX"
sh "rm -rf world"
}
}
stage("deploy") {
when {
branch '**/master'
}
steps {
sh "git clean -dfX"
sh "rm -rf world"
sshagent(['ce4c701d-098c-4706-8f32-c0af996a7769']) {
sh "ssh -o StrictHostKeyChecking=no gamehost@entertainment 'systemctl --user stop rsemcs'"
sh "rsync -a --update --exclude ./mods/ --exclude ./config/ ./** gamehost@entertainment:/home/gamehost/mcserver/"