From c601ae9695f90518b8c51846a8701cce366ac6d7 Mon Sep 17 00:00:00 2001 From: Harrison Deng Date: Thu, 12 May 2022 02:54:30 -0500 Subject: [PATCH] Added resource lock for port 25565 in Jenkinsfile. --- Jenkinsfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index d02cc0a..27d5151 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,7 +12,9 @@ pipeline { dir('server') { sh 'echo "eula=true" > eula.txt' 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 sh 'git reset --hard'