From 97c7f3b500337d125da91909041edd51854b0af3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gardais=20J=C3=A9r=C3=A9my?= Date: Thu, 26 Apr 2018 17:08:14 +0200 Subject: [PATCH] Ensure to change working directory for jenkins --- jenkins_check_update | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jenkins_check_update b/jenkins_check_update index 6dc0430..429765f 100755 --- a/jenkins_check_update +++ b/jenkins_check_update @@ -26,6 +26,7 @@ if [ ! -f "${JENKINS_AUTH_FILE}" ]; then exit 1 fi +cd "$(dirname ${JENKINS_AUTH_FILE})" || exit # Verify if updates are availables for plugins if java -jar "${JENKINS_CLI_JAR}" -s http://127.0.0.1:8080 -auth @.jenkins.auth list-plugins | grep -i -q -- "(.*)$" then @@ -35,5 +36,6 @@ else rm -f "${JENKINS_PLUGIN_UPDATE_LOG}" #printf '%b\n' "Nothing to do" fi +cd - || exit exit 0