blob: cc46fafdb7467f31dd48c33a81f8db60dde08d12 [file] [log] [blame]
#!/bin/bash
# Copy plugins .jpi files from /opt/plugins_files_offline to $JENKINS_HOME/plugins
# at first boot after upgrading docker. This script should be executed before starting up jenkins.
# The script will watch "$JENKINS_HOME/.plugins_for_X.XXX.X_installed" file existence.
set -e
watchfile="${JENKINS_HOME}/.plugins_for_2.414.2_installed"
test -d "${JENKINS_HOME}/plugins" || mkdir -p "${JENKINS_HOME}/plugins"
if [[ ! -f "${watchfile}" ]] ; then
cp /opt/plugins_files_offline/*.jpi "${JENKINS_HOME}/plugins"
touch "${watchfile}"
fi