Added resource lock for port 25565 in Jenkinsfile.

This commit is contained in:
Harrison Deng 2022-05-12 02:54:30 -05:00
parent d11b607267
commit c601ae9695

4
Jenkinsfile vendored
View File

@ -12,7 +12,9 @@ pipeline {
dir('server') { dir('server') {
sh 'echo "eula=true" > eula.txt' sh 'echo "eula=true" > eula.txt'
sh "chmod u+x ./run.sh" sh "chmod u+x ./run.sh"
sh 'echo "stop" | ./run.sh' lock('Port 25565') {
sh 'echo "stop" | ./run.sh'
}
} }
logParser failBuildOnError: true, projectRulePath: 'Jenkinsparse', parsingRulesPath: 'Jenkinsparse', showGraphs: true, unstableOnWarning: true, useProjectRule: true logParser failBuildOnError: true, projectRulePath: 'Jenkinsparse', parsingRulesPath: 'Jenkinsparse', showGraphs: true, unstableOnWarning: true, useProjectRule: true
sh 'git reset --hard' sh 'git reset --hard'