Skip to content

Instantly share code, notes, and snippets.

@dustincurrie
Created February 20, 2012 22:15
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dustincurrie/1871861 to your computer and use it in GitHub Desktop.
Save dustincurrie/1871861 to your computer and use it in GitHub Desktop.
Jenkins for the Drupal Quickstart: Pre-made Development Environment. Tested on Ubuntu 11.04 64bit.
#!/bin/bash
# ################################################################################ Jenkins
# README:
#
# This script will install Jenkins (a continious integration server) on port 8081
#
HELP="
Jenkins Installation complete.
Jenkins is a continious integration server. Jenkins is running on port 8081.
To restart Jenkins: sudo /etc/init.d/jenkins restart
To admin Jenkins: http://localhost:8081/
- You will need to restart Ubuntu before accessing this URL for the first time.
For details on using Jenkins with Drupal, see here: http://groups.drupal.org/node/96289
"
cd ~
# Get the package signer key
wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
# Add an entry in your /etc/apt/sources.list
sudo echo "deb http://pkg.jenkins-ci.org/debian binary/" | sudo tee -a /etc/apt/sources.list
# Install package
sudo apt-get update
sudo apt-get install jenkins
# Fix any dependencies
sudo apt-get -y install -f
# Configure
sudo /etc/init.d/jenkins stop
sudo sed -i 's/JENKINS_USER=jenkins/JENKINS_USER=quickstart/g' /etc/default/jenkins
sudo sed -i 's/HTTP_PORT=8080/HTTP_PORT=8081/g' /etc/default/jenkins
mkdir /home/quickstart/jenkins
sudo sed -i 's/\/var\/lib\/jenkins/\/home\/quickstart\/jenkins/g' /etc/default/jenkins
sudo /etc/init.d/jenkins start
echo "$HELP"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment