Skip to content

Commit fceca01

Browse files
committed
Upgrade Java 7->8 to fix the Jenkins install process
Fixes #35 Fixes #50 Fixes #65
1 parent b28f7b9 commit fceca01

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

packer-templates/scripts/jenkins.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
#!/bin/bash -eux
22

33
# JDK and JRE are required for Jenkins
4-
apt-get install -y openjdk-7-jre openjdk-7-jdk unzip dos2unix
4+
apt-get install -y software-properties-common # Installs add-apt-repository in 14.04
5+
add-apt-repository ppa:openjdk-r/ppa
6+
apt-get update
7+
apt-get install -y \
8+
openjdk-8-jre \
9+
openjdk-8-jre-headless \
10+
openjdk-8-jdk \
11+
dos2unix \
12+
zip \
13+
unzip
514

615
wget -q -O - https://jenkins-ci.org/debian/jenkins-ci.org.key | apt-key add -
716
echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list
@@ -31,4 +40,4 @@ tar zxvf /tmp/jenkins-config/example-job.tar.gz
3140
chown -R jenkins:jenkins /var/lib/jenkins
3241

3342
# restart for jenkins to pick up the new configs
34-
service jenkins restart
43+
service jenkins restart

0 commit comments

Comments
 (0)