Ensure to remove update information if upgraded
This commit is contained in:
parent
3dc74ad15f
commit
d93818eb87
|
@ -33,7 +33,7 @@ then
|
|||
touch "${JENKINS_PLUGIN_UPDATE_LOG}"
|
||||
#printf '%b\n' "Please upgrade plugins"
|
||||
else
|
||||
rm -f "${JENKINS_PLUGIN_UPDATE_LOG}"
|
||||
rm -f -- "${JENKINS_PLUGIN_UPDATE_LOG}"
|
||||
#printf '%b\n' "Nothing to do"
|
||||
fi
|
||||
cd - > /dev/null || exit
|
||||
|
|
|
@ -14,6 +14,7 @@ JENKINS_CLI_JAR="${JENKINS_HOME}/war/WEB-INF/jenkins-cli.jar"
|
|||
JENKINS_AUTH_FILE="/root/.jenkins.auth"
|
||||
|
||||
JENKINS_PLUGIN_LIST_FILE="${JENKINS_HOME}/updates/.plugin_list.$(date +%Y%m%d)"
|
||||
JENKINS_PLUGIN_UPDATE_LOG="${JENKINS_HOME}/.update_plugin"
|
||||
|
||||
if [ ! -f "${JENKINS_CLI_JAR}" ]; then
|
||||
printf '%b\n' "Jenkins-cli (${JENKINS_CLI_JAR}) does not seem to be available."
|
||||
|
@ -54,5 +55,6 @@ cd - > /dev/null || exit
|
|||
|
||||
# Purge "log" files older than 30 days
|
||||
find "${JENKINS_HOME}/updates" -iname ".plugin_list*" -mtime +30 -delete
|
||||
rm -f -- "${JENKINS_PLUGIN_UPDATE_LOG}"
|
||||
|
||||
exit 0
|
||||
|
|
Loading…
Reference in New Issue