Browse Source

Install Java 8 on build agents.

master
Chris Smith 10 years ago
parent
commit
10ccbaadc9
2 changed files with 29 additions and 1 deletions
  1. 2
    1
      playbooks/dmdirc-buildagent.yml
  2. 27
    0
      playbooks/includes/install-java8

+ 2
- 1
playbooks/dmdirc-buildagent.yml View File

@@ -25,7 +25,6 @@
25 25
       - ant
26 26
       - git
27 27
       - unzip
28
-      - openjdk-7-jdk
29 28
       - nsis
30 29
       - dpkg-dev
31 30
       - cdbs
@@ -35,6 +34,8 @@
35 34
       - alien
36 35
       - fakeroot
37 36
 
37
+  - include: includes/install-java8
38
+
38 39
   - name: fetch agent zip
39 40
     sudo_user: "{{ teamcity_user }}"
40 41
     get_url: url=http://teamcity.dmdirc.com/update/buildAgent.zip dest={{ home_dir }}

+ 27
- 0
playbooks/includes/install-java8 View File

@@ -0,0 +1,27 @@
1
+---
2
+# Adds the WebUpd8 PPA and installs Java8.
3
+
4
+- name: 'Install debconf-utils'
5
+  apt: pkg=debconf-utils
6
+
7
+- name: 'Check for oracle license agreement'
8
+  shell: '/usr/bin/debconf-get-selections | grep oracle-java8-installer'
9
+  register: selections
10
+  ignore_errors: yes
11
+  changed_when: False
12
+
13
+- name: 'Accept oracle license agreeement'
14
+  shell: 'echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections'
15
+  when: selections|failed
16
+
17
+- include: install-from-ppa
18
+  vars:
19
+    ppa: 'ppa:webupd8team/java'
20
+    ppa_mint: 'deb http://ppa.launchpad.net/webupd8team/java/ubuntu saucy main'
21
+    package: 'oracle-java8-installer'
22
+
23
+- include: install-from-ppa
24
+  vars:
25
+    ppa: 'ppa:webupd8team/java'
26
+    ppa_mint: 'deb http://ppa.launchpad.net/webupd8team/java/ubuntu saucy main'
27
+    package: 'oracle-java8-set-default'

Loading…
Cancel
Save