Last active
May 29, 2019 17:39
-
-
Save kmcquade/b91739755d5cd0f478ee4b489942592d to your computer and use it in GitHub Desktop.
Remove plugins from pre-baked Jenkins docker image
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -x | |
#JENKINS_PLUGINS_PATH="${JENKINS_PLUGINS_PATH:-/usr/share/jenkins/ref/plugins}" | |
JENKINS_PLUGINS_PATH="${JENKINS_PLUGINS_PATH:-/usr/share/jenkins/ref/plugins}" | |
REMOVE_PLUGINS_LIST_PATH="${REMOVE_PLUGINS_LIST_PATH:-/usr/share/jenkins/ref/remove_plugins_list.txt}" | |
echo $JENKINS_PLUGINS_PATH | |
echo $REMOVE_PLUGINS_LIST_PATH | |
for line in `cat ${REMOVE_PLUGINS_LIST_PATH}` | |
do | |
echo "$line" | |
find ${JENKINS_PLUGINS_PATH}/ -name ${line}\* | xargs rm -rf | |
done | |
# testing locally: | |
# JENKINS_PLUGINS_PATH=./test REMOVE_PLUGINS_LIST_PATH=./remove_plugins_list.txt ./remove_plugins.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment