Merge default into production production
authorHenrik Skupin <mail@hskupin.info>
Tue, 08 Jul 2014 19:58:42 +0200
branchproduction
changeset 1922 0994a64bb26fafeac7d64cacc5e411e7ab706e80
parent 1920 2869859a81e9c067b646a20f683a7905727a06d4 (current diff)
parent 1921 639837b0fa0923c48b6387b7a6a208feb9003c88 (diff)
child 1924 e35bc82bc989b262a48eb130ac92e003a4e352d4
push id15
push userhskupin@mozilla.com
push dateTue, 08 Jul 2014 17:58:50 +0000
Merge default into production
new file mode 100644
--- /dev/null
+++ b/modules/packages/manifests/java.pp
@@ -0,0 +1,36 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+class packages::java {
+    anchor {
+        'packages::java::begin': ;
+        'packages::java::end': ;
+    }
+
+    case $::operatingsystem {
+        Darwin: {
+            # The dmg is available from https://www.java.com/en/download/manual.jsp
+            Anchor['packages::java::begin'] ->
+            packages::pkgdmg {
+                "java":
+                   version => "7.0.600",
+                   os_version_specific => false,
+            } -> Anchor['packages::java::end']
+        }
+        Ubuntu: {
+            package {
+                "openjdk-7-jre":
+                    ensure => latest;
+
+                # Install icedtea-netx for the javaws command
+                "icedtea-netx":
+                    ensure => latest,
+                    require => Package["openjdk-7-jre"];
+            }
+        }
+        default: {
+            fail("Cannot install on $::operatingsystem")
+        }
+    }
+}
--- a/modules/packages/manifests/pkgdmg.pp
+++ b/modules/packages/manifests/pkgdmg.pp
@@ -1,30 +1,38 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
-define packages::pkgdmg($version, $private=false, $dmgname=undef, $os_version_specific=true) {
+
+define packages::pkgdmg(
+    $version,
+    $private=false,
+    $dmgname=undef,
+    $os_version_specific=true
+) {
     include ::config
     case $dmgname {
-            undef: {
-                     $filename = "${name}-${version}.dmg"
-            }
-            default: {
-                $filename = $dmgname
-            }
+        undef: {
+            $filename = "${name}-${version}.dmg"
+        }
+        default: {
+            $filename = $dmgname
+        }
     }
 
     $p = $private ? {
         true => "/private",
         false => ""
     }
+
     $v = $os_version_specific ? {
         true => "/${macosx_productversion_major}",
         false => ""
     }
+
     $source = "http://${::config::data_server}/repos${p}/DMGs${v}/$filename"
 
     package {
         $filename:
             provider => pkgdmg,
             ensure => installed,
             source => $source;
     }
--- a/modules/toplevel/manifests/slave/qa.pp
+++ b/modules/toplevel/manifests/slave/qa.pp
@@ -2,16 +2,18 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 # All buildbot slaves (both build and test) are subclasses of this class.
 
 # All QA slaves (both mozmill-ci and tps-ci) are subclasses of this class.
 class toplevel::slave::qa inherits toplevel::slave {
     include vnc
 
+    include packages::java
+
     class {
         gui:
             on_gpu => true,
             screen_width => 1024,
             screen_height => 768,
             screen_depth => 32,
             refresh => 60;
     }