Created
August 26, 2016 17:37
-
-
Save snoby/7944d188a2548f30f0ff58d17453c148 to your computer and use it in GitHub Desktop.
Installation of jenkins plugins
This file contains 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
#!/bin/bash | |
set -e | |
PLUGINS_ENDPOINT=http://updates.jenkins-ci.org/latest/ | |
DATA=/var/lib/jenkins | |
mkdir -p $DATA/plugins | |
if find $DATA/plugins -maxdepth 0 -empty | read v; then | |
(cd $DATA/plugins && wget --no-check-certificate $PLUGINS_ENDPOINT/hipchat.hpi) | |
(cd $DATA/plugins && wget --no-check-certificate $PLUGINS_ENDPOINT/greenballs.hpi) | |
(cd $DATA/plugins && wget --no-check-certificate $PLUGINS_ENDPOINT/credentials.hpi) | |
(cd $DATA/plugins && wget --no-check-certificate $PLUGINS_ENDPOINT/ssh-credentials.hpi) | |
(cd $DATA/plugins && wget --no-check-certificate $PLUGINS_ENDPOINT/ssh-agent.hpi) | |
(cd $DATA/plugins && wget --no-check-certificate $PLUGINS_ENDPOINT/git-client.hpi) | |
(cd $DATA/plugins && wget --no-check-certificate $PLUGINS_ENDPOINT/git.hpi) | |
(cd $DATA/plugins && wget --no-check-certificate $PLUGINS_ENDPOINT/github.hpi) | |
(cd $DATA/plugins && wget --no-check-certificate $PLUGINS_ENDPOINT/github-api.hpi) | |
(cd $DATA/plugins && wget --no-check-certificate $PLUGINS_ENDPOINT/ghprb.hpi) | |
(cd $DATA/plugins && wget --no-check-certificate $PLUGINS_ENDPOINT/github-oauth.hpi) | |
(cd $DATA/plugins && wget --no-check-certificate $PLUGINS_ENDPOINT/scm-api.hpi) | |
(cd $DATA/plugins && wget --no-check-certificate $PLUGINS_ENDPOINT/postbuild-task.hpi) | |
fi | |
chown -R jenkins $DATA | |
exec su jenkins -c "java -jar /usr/share/jenkins/jenkins.war" | |
Contact GitHub API Training Shop Blog About |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment