bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ofle...@apache.org
Subject [1/2] bigtop git commit: BIGTOP-2089: Fix bigtop.sh generation
Date Wed, 21 Oct 2015 14:14:27 GMT
Repository: bigtop
Updated Branches:
  refs/heads/master d32c23a54 -> 2c2579cf5


BIGTOP-2089: Fix bigtop.sh generation


Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/2bf76ff0
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/2bf76ff0
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/2bf76ff0

Branch: refs/heads/master
Commit: 2bf76ff0fc8d3b9f78d3805f10cf9160be6263ec
Parents: d32c23a
Author: Olaf Flebbe <of@oflebbe.de>
Authored: Wed Oct 14 22:26:00 2015 +0200
Committer: Olaf Flebbe <of@oflebbe.de>
Committed: Wed Oct 21 16:07:45 2015 +0200

----------------------------------------------------------------------
 bigtop_toolchain/files/jenkins.sh.centos   | 22 --------
 bigtop_toolchain/files/jenkins.sh.debian   | 22 --------
 bigtop_toolchain/files/jenkins.sh.fedora   | 22 --------
 bigtop_toolchain/files/jenkins.sh.opensuse | 22 --------
 bigtop_toolchain/manifests/env.pp          | 71 +++++++------------------
 bigtop_toolchain/manifests/jdk.pp          |  2 +-
 bigtop_toolchain/templates/jenkins.sh      | 22 ++++++++
 7 files changed, 41 insertions(+), 142 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/2bf76ff0/bigtop_toolchain/files/jenkins.sh.centos
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/files/jenkins.sh.centos b/bigtop_toolchain/files/jenkins.sh.centos
deleted file mode 100644
index badb18c..0000000
--- a/bigtop_toolchain/files/jenkins.sh.centos
+++ /dev/null
@@ -1,22 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-export MAVEN_HOME=/usr/local/maven
-export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk.x86_64
-export ANT_HOME=/usr/local/ant
-export GRADLE_HOME=/usr/local/gradle
-export PATH=$MAVEN_HOME/bin:$ANT_HOME/bin:$FORREST_HOME/bin:$GRADLE_HOME/bin:$PATH
-
-export GRADLE_OPTS="-Dorg.gradle.daemon=true"

http://git-wip-us.apache.org/repos/asf/bigtop/blob/2bf76ff0/bigtop_toolchain/files/jenkins.sh.debian
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/files/jenkins.sh.debian b/bigtop_toolchain/files/jenkins.sh.debian
deleted file mode 100644
index 65217fe..0000000
--- a/bigtop_toolchain/files/jenkins.sh.debian
+++ /dev/null
@@ -1,22 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-export MAVEN_HOME=/usr/local/maven
-export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64
-export ANT_HOME=/usr/local/ant
-export GRADLE_HOME=/usr/local/gradle
-export PATH=$MAVEN_HOME/bin:$ANT_HOME/bin:$FORREST_HOME/bin:$GRADLE_HOME/bin:$PATH
-
-export GRADLE_OPTS="-Dorg.gradle.daemon=true"

http://git-wip-us.apache.org/repos/asf/bigtop/blob/2bf76ff0/bigtop_toolchain/files/jenkins.sh.fedora
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/files/jenkins.sh.fedora b/bigtop_toolchain/files/jenkins.sh.fedora
deleted file mode 100644
index 6de7981..0000000
--- a/bigtop_toolchain/files/jenkins.sh.fedora
+++ /dev/null
@@ -1,22 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-export MAVEN_HOME=/usr/local/maven
-export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk
-export ANT_HOME=/usr/local/ant
-export GRADLE_HOME=/usr/local/gradle
-export PATH=$MAVEN_HOME/bin:$ANT_HOME/bin:$FORREST_HOME/bin:$GRADLE_HOME/bin:$PATH
-
-export GRADLE_OPTS="-Dorg.gradle.daemon=true"

http://git-wip-us.apache.org/repos/asf/bigtop/blob/2bf76ff0/bigtop_toolchain/files/jenkins.sh.opensuse
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/files/jenkins.sh.opensuse b/bigtop_toolchain/files/jenkins.sh.opensuse
deleted file mode 100644
index 508cf5d..0000000
--- a/bigtop_toolchain/files/jenkins.sh.opensuse
+++ /dev/null
@@ -1,22 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-export MAVEN_HOME=/usr/local/maven
-export JAVA_HOME=/usr/lib64/jvm/java-1.7.0-openjdk
-export ANT_HOME=/usr/local/ant
-export GRADLE_HOME=/usr/local/gradle
-export PATH=$MAVEN_HOME/bin:$ANT_HOME/bin:$FORREST_HOME/bin:$GRADLE_HOME/bin:$PATH
-
-export GRADLE_OPTS="-Dorg.gradle.daemon=true"

http://git-wip-us.apache.org/repos/asf/bigtop/blob/2bf76ff0/bigtop_toolchain/manifests/env.pp
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/manifests/env.pp b/bigtop_toolchain/manifests/env.pp
index 738cd96..b309eca 100644
--- a/bigtop_toolchain/manifests/env.pp
+++ b/bigtop_toolchain/manifests/env.pp
@@ -14,62 +14,27 @@
 # limitations under the License.
 
 class bigtop_toolchain::env {
-  case $operatingsystem{
-    Ubuntu,Debian: {
-      file { '/etc/profile.d/bigtop.sh':
-        source => 'puppet:///modules/bigtop_toolchain/jenkins.sh.debian',
-        ensure => present,
-        owner  => root,
-        group  => root,
-        mode   => 644,
-      }
-    }
-    Fedora: {
-      file {'/etc/profile.d/bigtop.sh':
-        source => 'puppet:///modules/bigtop_toolchain/jenkins.sh.fedora',
-        ensure => present,
-        owner  => root,
-        group  => root,
-        mode   => 644,
-      }
-    }
-    CentOS: {
-      if $operatingsystemmajrelease >=7 {
-        file {'/etc/profile.d/bigtop.sh':
-          source => 'puppet:///modules/bigtop_toolchain/jenkins.sh.fedora',
-          ensure => present,
-          owner  => root,
-          group  => root,
-          mode   => 644,
-        }
-      } else {
-        file {'/etc/profile.d/bigtop.sh':
-          source => 'puppet:///modules/bigtop_toolchain/jenkins.sh.centos',
-          ensure => present,
-          owner  => root,
-          group  => root,
-          mode   => 644,
-        }
-      }
+  case $architecture {
+    'amd64' : { $arch= "amd64" }
+    'ppc64le' : { $arch= "ppc64el" }
+  }
+  case $operatingsystem {
+    'Ubuntu','Debian': {
+      $javahome = "/usr/lib/jvm/java-1.7.0-openjdk-$arch"
     }
-    OpenSuSE: {
-      file {'/etc/profile.d/bigtop.sh':
-        source => 'puppet:///modules/bigtop_toolchain/jenkins.sh.opensuse',
-        ensure => present,
-        owner  => root,
-        group  => root,
-        mode   => 644,
-      }
+    'Fedora','Centos', 'Amazon': {
+      $javahome = "/usr/lib/jvm/java-1.7.0"
     }
-    default: {
-      file {'/etc/profile.d/bigtop.sh':
-        source => 'puppet:///modules/bigtop_toolchain/jenkins.sh.centos',
-        ensure => present,
-        owner  => root,
-        group  => root,
-        mode   => 644,
-      }
+    'OpenSuSE' : {
+      $javahome = "/usr/lib64/jvm/java-1.7.0-openjdk-1.7.0"
     }
   }
+  file { '/etc/profile.d/bigtop.sh':
+    content => template('bigtop_toolchain/jenkins.sh'),
+    ensure => present,
+    owner  => root,
+    group  => root,
+    mode   => 644,
+  }
 }
 

http://git-wip-us.apache.org/repos/asf/bigtop/blob/2bf76ff0/bigtop_toolchain/manifests/jdk.pp
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/manifests/jdk.pp b/bigtop_toolchain/manifests/jdk.pp
index 6c71ec4..730728f 100644
--- a/bigtop_toolchain/manifests/jdk.pp
+++ b/bigtop_toolchain/manifests/jdk.pp
@@ -47,7 +47,7 @@ class bigtop_toolchain::jdk {
       
       Apt::Ppa['http://ppa.launchpad.net/openjdk-r/ppa/ubuntu'] -> Exec['apt-update']
     }
-    /(CentOS|Fedora|Amazon|OpenSuSE)/: {
+    /(CentOS|Fedora|Amazon)/: {
       package { 'java-1.7.0-openjdk-devel' :
         ensure => present
       }

http://git-wip-us.apache.org/repos/asf/bigtop/blob/2bf76ff0/bigtop_toolchain/templates/jenkins.sh
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/templates/jenkins.sh b/bigtop_toolchain/templates/jenkins.sh
new file mode 100644
index 0000000..31e3ecd
--- /dev/null
+++ b/bigtop_toolchain/templates/jenkins.sh
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+export MAVEN_HOME=/usr/local/maven
+export JAVA_HOME=<%= @javahome %>
+export ANT_HOME=/usr/local/ant
+export GRADLE_HOME=/usr/local/gradle
+export PATH=$MAVEN_HOME/bin:$ANT_HOME/bin:$GRADLE_HOME/bin:$PATH
+
+export GRADLE_OPTS="-Dorg.gradle.daemon=true"


Mime
View raw message