From 0b170d8c090d42479b945f3c39528f905f3eccdc Mon Sep 17 00:00:00 2001 From: Harrison Deng Date: Fri, 13 May 2022 15:37:09 -0500 Subject: [PATCH] Added cleanup stage. --- Jenkinsfile | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 408c6f3..7ce4216 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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/"