Return-Path: X-Original-To: apmail-bigtop-commits-archive@www.apache.org Delivered-To: apmail-bigtop-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8C2E618138 for ; Wed, 21 Oct 2015 14:14:34 +0000 (UTC) Received: (qmail 90810 invoked by uid 500); 21 Oct 2015 14:14:34 -0000 Delivered-To: apmail-bigtop-commits-archive@bigtop.apache.org Received: (qmail 89535 invoked by uid 500); 21 Oct 2015 14:14:27 -0000 Mailing-List: contact commits-help@bigtop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: bigtop-dev@bigtop.apache.org Delivered-To: mailing list commits@bigtop.apache.org Received: (qmail 89523 invoked by uid 99); 21 Oct 2015 14:14:27 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Oct 2015 14:14:27 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 50B79E00BD; Wed, 21 Oct 2015 14:14:27 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: oflebbe@apache.org To: commits@bigtop.apache.org Date: Wed, 21 Oct 2015 14:14:27 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/2] bigtop git commit: BIGTOP-2089: Fix bigtop.sh generation 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 Authored: Wed Oct 14 22:26:00 2015 +0200 Committer: Olaf Flebbe 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"