Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello Michael.
I have created and tested a quickstart contrib script to install Jenkins rather than Hudson.
The script follows the same pattern as the Hudson version.
IF you'd like to add it, you can grab the script from this GitHub Gist:
https://gist.github.com/1268684
or Public Clone URL: git://gist.github.com/1268684.git
I have tested it on a fresh install of Ubuntu 11.04 64bit. A restart is required.
If you'd like anything tweaked and you don't have time to do it, just let me know if I can help.
All the best -Sean Buscay
Code also pasted below:
#!/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"
Comments
Comment #1
elvis2 CreditAttribution: elvis2 commentedHi Sean, I ran the script then rebooted Ubuntu and all seemed we. But when I go to the URL http://localhost:8081
I get the following errors on the screen:
hudson.util.IOException2: Failed to create a temporary file in /home/quickstart/jenkins
at hudson.util.AtomicFileWriter.(AtomicFileWriter.java:67)
at hudson.util.AtomicFileWriter.(AtomicFileWriter.java:54)
at hudson.util.TextFile.write(TextFile.java:78)
at jenkins.model.Jenkins.(Jenkins.java:712)
at hudson.model.Hudson.(Hudson.java:81)
at hudson.model.Hudson.(Hudson.java:77)
at hudson.WebAppMain$2.run(WebAppMain.java:217)
Caused by: java.io.IOException: Permission denied
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.checkAndCreate(File.java:1716)
at java.io.File.createTempFile(File.java:1804)
at hudson.util.AtomicFileWriter.(AtomicFileWriter.java:65)
... 6 more
Can you point me in the right direction?
Thanks
Comment #2
Sean Buscay CreditAttribution: Sean Buscay commentedHi elvis2.
I think I've seen this before when I accidentally ran the script as sudo (thus setting root user permissions in the jenkins directory).
Try to chown the full home/quickstart/jenkins directory to quickstart:
sudo chown -R quickstart /home/quickstart/jenkins
Then if needed also change write permissions:
chmod -R 755 /home/quickstart/jenkins
Let me know if that worked for you.
Comment #3
Matt V. CreditAttribution: Matt V. commentedThe script worked as expected for me. I noticed Comment #2 before running it, so I made sure not to run it with sudo.
The only thing I might consider changing is the "For details on using Jenkins" link. That page is primarily about Hudson; Jenkins isn't mentioned until mid-way down the page. That could be confusing to anyone not already familiar with the Hudson/Jenkins split.
Comment #4
Sean Buscay CreditAttribution: Sean Buscay commentedThanks Matt.
Good point on the link. I'll change it soon on my github version.
Comment #5
mautumn CreditAttribution: mautumn commentedSean thanks very much indeed for this script. It worked for me first time - when other techniques I tried failed - so you saved me a lot of time. I really appreciate you taking the time to share your knowledge and experience.
Comment #6
chriscalip CreditAttribution: chriscalip commentedmy experience is to make sure openjdk-6-jre.. am i right about this?