Skip to content

Instantly share code, notes, and snippets.

@kenmoini
Created May 6, 2020 17:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kenmoini/fb0be10a79558e2e8c973ef0e25bccf9 to your computer and use it in GitHub Desktop.
Save kenmoini/fb0be10a79558e2e8c973ef0e25bccf9 to your computer and use it in GitHub Desktop.
Jenkins Automated Plugin Stuffer
#!/usr/bin/env bash
## This script pulls in plugins for Jenkins manually and drops them into the plugins directory
set -e
## set -x ## Uncomment for debugging
echo ""
echo -e "Starting plugin downloads...\n"
for PLUGIN in "$@"
do
echo "Pulling plugin file for ${PLUGIN}..."
## Rename to .jpi because that is what they do for system included plugins...yeah...whatever
curl -L -sS -o "$JENKINS_HOME/plugins/${PLUGIN}.jpi" "https://updates.jenkins.io/latest/${PLUGIN}.hpi"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment