Added cleanup stage.
This commit is contained in:
parent
01df79d2ee
commit
0b170d8c09
13
Jenkinsfile
vendored
13
Jenkinsfile
vendored
@ -2,11 +2,6 @@ pipeline {
|
|||||||
agent any
|
agent any
|
||||||
stages {
|
stages {
|
||||||
stage("server trial") {
|
stage("server trial") {
|
||||||
when {
|
|
||||||
not {
|
|
||||||
branch '**/sync-modpack'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
steps {
|
steps {
|
||||||
sh 'echo "eula=true" > eula.txt'
|
sh 'echo "eula=true" > eula.txt'
|
||||||
sh "chmod u+x ./run.sh"
|
sh "chmod u+x ./run.sh"
|
||||||
@ -18,13 +13,17 @@ pipeline {
|
|||||||
sh "rm mods/DynmapBlockScan.jar"
|
sh "rm mods/DynmapBlockScan.jar"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
stage("Cleanup") {
|
||||||
|
steps {
|
||||||
|
sh "git clean -dfX"
|
||||||
|
sh "rm -rf world"
|
||||||
|
}
|
||||||
|
}
|
||||||
stage("deploy") {
|
stage("deploy") {
|
||||||
when {
|
when {
|
||||||
branch '**/master'
|
branch '**/master'
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
sh "git clean -dfX"
|
|
||||||
sh "rm -rf world"
|
|
||||||
sshagent(['ce4c701d-098c-4706-8f32-c0af996a7769']) {
|
sshagent(['ce4c701d-098c-4706-8f32-c0af996a7769']) {
|
||||||
sh "ssh -o StrictHostKeyChecking=no gamehost@entertainment 'systemctl --user stop rsemcs'"
|
sh "ssh -o StrictHostKeyChecking=no gamehost@entertainment 'systemctl --user stop rsemcs'"
|
||||||
sh "rsync -a --update --exclude ./mods/ --exclude ./config/ ./** gamehost@entertainment:/home/gamehost/mcserver/"
|
sh "rsync -a --update --exclude ./mods/ --exclude ./config/ ./** gamehost@entertainment:/home/gamehost/mcserver/"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user