diff options
Diffstat (limited to 'bigtop_toolchain')
-rw-r--r-- | bigtop_toolchain/files/jenkins.sh.centos | 22 | ||||
-rw-r--r-- | bigtop_toolchain/files/jenkins.sh.debian | 22 | ||||
-rw-r--r-- | bigtop_toolchain/files/jenkins.sh.opensuse | 22 | ||||
-rw-r--r-- | bigtop_toolchain/manifests/env.pp | 71 | ||||
-rw-r--r-- | bigtop_toolchain/manifests/jdk.pp | 2 | ||||
-rw-r--r-- | bigtop_toolchain/templates/jenkins.sh (renamed from bigtop_toolchain/files/jenkins.sh.fedora) | 4 |
6 files changed, 21 insertions, 122 deletions
diff --git a/bigtop_toolchain/files/jenkins.sh.centos b/bigtop_toolchain/files/jenkins.sh.centos deleted file mode 100644 index badb18c6..00000000 --- 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" diff --git a/bigtop_toolchain/files/jenkins.sh.debian b/bigtop_toolchain/files/jenkins.sh.debian deleted file mode 100644 index 65217fe7..00000000 --- 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" diff --git a/bigtop_toolchain/files/jenkins.sh.opensuse b/bigtop_toolchain/files/jenkins.sh.opensuse deleted file mode 100644 index 508cf5db..00000000 --- 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" diff --git a/bigtop_toolchain/manifests/env.pp b/bigtop_toolchain/manifests/env.pp index 738cd965..b309eca8 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, + } } diff --git a/bigtop_toolchain/manifests/jdk.pp b/bigtop_toolchain/manifests/jdk.pp index 6c71ec42..730728f9 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 } diff --git a/bigtop_toolchain/files/jenkins.sh.fedora b/bigtop_toolchain/templates/jenkins.sh index 6de79815..31e3ecde 100644 --- a/bigtop_toolchain/files/jenkins.sh.fedora +++ b/bigtop_toolchain/templates/jenkins.sh @@ -14,9 +14,9 @@ # limitations under the License. export MAVEN_HOME=/usr/local/maven -export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk +export JAVA_HOME=<%= @javahome %> 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 PATH=$MAVEN_HOME/bin:$ANT_HOME/bin:$GRADLE_HOME/bin:$PATH export GRADLE_OPTS="-Dorg.gradle.daemon=true" |