Ensure to change working directory for jenkins

This commit is contained in:
Jeremy Gardais 2018-04-26 17:08:14 +02:00
parent bf4cc41b3d
commit 97c7f3b500
1 changed files with 2 additions and 0 deletions

View File

@ -26,6 +26,7 @@ if [ ! -f "${JENKINS_AUTH_FILE}" ]; then
exit 1 exit 1
fi fi
cd "$(dirname ${JENKINS_AUTH_FILE})" || exit
# Verify if updates are availables for plugins # 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 -- "(.*)$" if java -jar "${JENKINS_CLI_JAR}" -s http://127.0.0.1:8080 -auth @.jenkins.auth list-plugins | grep -i -q -- "(.*)$"
then then
@ -35,5 +36,6 @@ else
rm -f "${JENKINS_PLUGIN_UPDATE_LOG}" rm -f "${JENKINS_PLUGIN_UPDATE_LOG}"
#printf '%b\n' "Nothing to do" #printf '%b\n' "Nothing to do"
fi fi
cd - || exit
exit 0 exit 0