Skip to content

Instantly share code, notes, and snippets.

@lukespragg
Created September 17, 2014 19:48
Show Gist options
  • Save lukespragg/aefca8bc59b63f2d13e1 to your computer and use it in GitHub Desktop.
Save lukespragg/aefca8bc59b63f2d13e1 to your computer and use it in GitHub Desktop.
Jenkins updater script
#!/bin/sh
echo Checking current Jenkins version...
# Read X-Jenkins HTTP header info
echo Checking for latest Jenkins release...
# http://updates.jenkins-ci.org/latestCore.txt
# echo Checking for jobs in queue before updating...
# http://localhost:8080/jenkins/queue/api/xml or http://localhost:8080/jenkins/queue/api/json
# <queue></queue>
echo Downloading latest jenkins.war...
wget -v --no-check-certificate -m -nd -O "/var/lib/tomcat6/webapps/jenkins.war" http://updates.jenkins-ci.org/latest/jenkins.war
# or just do apt-get update ??
# Just do this instead of cheating queue for jobs?
# http://localhost:8080/jenkins/safeRestart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment