Vladimir Khlyunev | cb02471 | 2022-02-28 19:50:43 +0400 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | # Copy plugins .jpi files from /opt/plugins_files_offline to $JENKINS_HOME/plugins |
| 4 | # at first boot after upgrading docker. This script should be executed before starting up jenkins. |
| 5 | # The script will watch "$JENKINS_HOME/.plugins_for_X.XXX.X_installed" file existence. |
| 6 | set -e |
Vladimir Khlyunev | 2223b66 | 2023-10-03 04:10:40 +0400 | [diff] [blame] | 7 | watchfile="${JENKINS_HOME}/.plugins_for_2.414.2_installed" |
Vladimir Khlyunev | be0803b | 2022-04-18 15:58:15 +0400 | [diff] [blame] | 8 | |
| 9 | test -d "${JENKINS_HOME}/plugins" || mkdir -p "${JENKINS_HOME}/plugins" |
| 10 | |
Vladimir Khlyunev | cb02471 | 2022-02-28 19:50:43 +0400 | [diff] [blame] | 11 | if [[ ! -f "${watchfile}" ]] ; then |
| 12 | cp /opt/plugins_files_offline/*.jpi "${JENKINS_HOME}/plugins" |
| 13 | touch "${watchfile}" |
| 14 | fi |