jenkins.plone.org/master: Add Java 8

Gil Forcada <jenkins-z4DKO/[email protected]>
Newsgroups gmane.comp.web.zope.plone.cvs
Message-ID <[email protected]>
Repository: jenkins.plone.org
Branch: refs/heads/master
Date: 2017-07-22T23:30:54+02:00
Author: Gil Forcada (gforcada) <[email protected]>
Commit: https://github.com/plone/jenkins.plone.org/commit/60545eea68dfabe92d96b33b6e3b8ee38df28252

Add Java 8

Jenkins, since version 2.60 requires Java 8,
for Ubuntu 14.04 (the one used still on Jenkins master) there is some more work involved.

Files changed:
M ansible/server.yml
M ansible/vagrant/playbook.yml

diff --git a/ansible/server.yml b/ansible/server.yml
index 55a4484..8f150eb 100644
--- a/ansible/server.yml
+++ b/ansible/server.yml
@@ -1,6 +1,31 @@
 ---
 # Jenkins server for Plone CI testing
 
+# TODO(gforcada) remove it as soon as jenkins master is on Ubuntu 16.04
+- hosts: jenkins.plone.org
+  remote_user: root
+  tasks:
+    - name: Install repository for Java 8 in Ubuntu
+      become: yes
+      apt_repository: repo='ppa:openjdk-r/ppa'
+
+    - name: Update
+      become: yes
+      apt:
+        update_cache=yes
+
+    - name: Install Java 8
+      become: yes
+      apt:
+        name=openjdk-8-jdk
+        state=installed
+
+    - name: Fix java version selected
+      become: yes
+      alternatives:
+        name: java
+        path: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
+
 - hosts: jenkins.plone.org
   remote_user: root
   roles:
diff --git a/ansible/vagrant/playbook.yml b/ansible/vagrant/playbook.yml
index 32620ce..b850be2 100644
--- a/ansible/vagrant/playbook.yml
+++ b/ansible/vagrant/playbook.yml
@@ -1,6 +1,27 @@
 ---
 # Jenkins server to test jenkins.plone.org locally with vagrant
 
+# TODO(gforcada) remove it as soon as jenkins master is on Ubuntu 16.04
+- hosts: master
+  tasks:
+    - name: Install repository for Java 8 in Ubuntu
+      become: yes
+      apt_repository: repo='ppa:openjdk-r/ppa'
+    - name: Update
+      become: yes
+      apt:
+        update_cache=yes
+    - name: Install Java 8
+      become: yes
+      apt:
+        name=openjdk-8-jdk
+        state=installed
+    - name: Fix java version selected
+      become: yes
+      alternatives:
+        name: java
+        path: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
+
 - hosts: master
   remote_user: vagrant
   become: yes
@@ -18,8 +39,10 @@
     github_orgs:
       - plone
       - collective
-    node_names:
-      - node
+    nodes_info:
+      - name: node
+        host: "127.0.0.1"
+        port: "8085"
     python_26: true
     pillow: true
     lxml: true



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.