Merge branch 'pipeline/remove-shell-dep' into develop

This commit is contained in:
Harrison Deng 2022-05-17 15:39:58 -05:00
commit 33813b52ed
5 changed files with 13 additions and 42 deletions

25
Jenkinsfile vendored
View File

@ -1,6 +1,6 @@
pipeline {
agent {
label 'linux && increased_mem'
label 'increased_mem'
}
options {
disableConcurrentBuilds()
@ -14,12 +14,11 @@ pipeline {
}
}
steps {
sh 'echo "eula=true" > eula.txt'
sh "chmod u+x ./run_trial.sh"
sh "curl -o mods/DynmapBlockScan.jar -LJR https://github.com/webbukkit/DynmapBlockScan/releases/download/v3.4-beta-1/DynmapBlockScan-3.4-beta-1-forge-1.18.jar"
sh 'echo "stop" | ./run_trial.sh'
fileOperations([fileCreateOperation(fileContent: 'eula=true', fileName: 'eula.txt')])
fileOperations([fileDownloadOperation(password: '', proxyHost: '', proxyPort: '', targetFileName: 'DynmapBlockScan.jar', targetLocation: 'mods/', url: 'https://github.com/webbukkit/DynmapBlockScan/releases/download/v3.4-beta-1/DynmapBlockScan-3.4-beta-1-forge-1.18.jar', userName: '')])
pwsh returnStatus: true, script: 'echo "stop" | java -Xmx4G @libraries/net/minecraftforge/forge/1.18.2-40.1.19/unix_args.txt'
logParser failBuildOnError: true, projectRulePath: 'Jenkinsparse', parsingRulesPath: 'Jenkinsparse', showGraphs: true, unstableOnWarning: true, useProjectRule: true
sh "rm mods/DynmapBlockScan.jar"
fileOperations([fileDeleteOperation(excludes: '', includes: 'mods/DynmapBlockScan.jar')])
}
}
stage("cleanup") {
@ -29,8 +28,8 @@ pipeline {
}
}
steps {
sh "git clean -dfX"
sh "rm -rf world"
pwsh "git clean -dfX"
fileOperations([folderDeleteOperation('world')])
}
}
stage("deploy") {
@ -39,11 +38,11 @@ pipeline {
}
steps {
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/"
sh "rsync -a --update --delete ./mods/ gamehost@entertainment:/home/gamehost/mcserver/mods"
sh "rsync -a --update --delete ./config/ gamehost@entertainment:/home/gamehost/mcserver/config"
sh "ssh gamehost@entertainment 'systemctl --user start rsemcs'"
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 ./config/ gamehost@entertainment:/home/gamehost/mcserver/config"
pwsh "ssh gamehost@entertainment 'systemctl --user start rsemcs'"
}
}
}

1
run.ps1 Executable file
View File

@ -0,0 +1 @@
java "@user_jvm_args.txt" "@libraries/net/minecraftforge/forge/1.18.2-40.1.19/unix_args.txt" $args

View File

@ -1,4 +0,0 @@
#!/bin/bash
cd server/mods
curl -LOJR https://github.com/webbukkit/DynmapBlockScan/releases/download/v3.4-beta-1/DynmapBlockScan-3.4-beta-1-forge-1.18.jar
cd ../../

View File

@ -1,11 +0,0 @@
#!/bin/bash
mkdir temp
cd temp
curl -LOJR https://dev.sys.reslate.xyz/dev-auto/job/ydeng/job/rsemcs-modpack/job/master/lastSuccessfulBuild/artifact/publish/RSEMCS_server.zip
unzip RSEMCS_server.zip
cd ../
cp -r temp/** .
rm -r temp
rm RSEMCS_server.zip
chmod u+x ./run.sh

View File

@ -1,14 +0,0 @@
#!/bin/bash
git clone git@dev.sys.reslate.xyz:ydeng/rsemcs.git update-folder
cd update-folder
git checkout develop
mkdir temp
cd temp
curl -LOJR https://dev.sys.reslate.xyz/dev-auto/job/ydeng-public/job/rsemcm/job/master/lastSuccessfulBuild/artifact/publish/RSEMCM_server.zip
unzip RSEMCM_server.zip
cd ../
rm -rf ./mods
mv ./temp/mods ./
rsync -av --ignore-existing temp/config ./config/.
rm -r ./temp