You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bigtop.apache.org by rv...@apache.org on 2016/08/24 00:57:43 UTC
bigtop git commit: BIGTOP-2518. Add node to the build slave
configuration
Repository: bigtop
Updated Branches:
refs/heads/master 19c442c66 -> 67c7d90c7
BIGTOP-2518. Add node to the build slave configuration
Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/67c7d90c
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/67c7d90c
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/67c7d90c
Branch: refs/heads/master
Commit: 67c7d90c7f9dd598384b00e18bf614482baaa13b
Parents: 19c442c
Author: Roman Shaposhnik <rv...@apache.org>
Authored: Tue Aug 23 17:56:34 2016 -0700
Committer: Roman Shaposhnik <rv...@apache.org>
Committed: Tue Aug 23 17:56:34 2016 -0700
----------------------------------------------------------------------
bigtop_toolchain/manifests/installer.pp | 1 +
bigtop_toolchain/manifests/node.pp | 40 ++++++++++++++++++++++++++++
bigtop_toolchain/templates/jenkins.sh | 3 ++-
3 files changed, 43 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/bigtop/blob/67c7d90c/bigtop_toolchain/manifests/installer.pp
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/manifests/installer.pp b/bigtop_toolchain/manifests/installer.pp
index 246fcaf..5bc99b6 100644
--- a/bigtop_toolchain/manifests/installer.pp
+++ b/bigtop_toolchain/manifests/installer.pp
@@ -18,6 +18,7 @@ class bigtop_toolchain::installer {
include bigtop_toolchain::maven
include bigtop_toolchain::ant
include bigtop_toolchain::gradle
+ include bigtop_toolchain::node
include bigtop_toolchain::protobuf
include bigtop_toolchain::packages
include bigtop_toolchain::env
http://git-wip-us.apache.org/repos/asf/bigtop/blob/67c7d90c/bigtop_toolchain/manifests/node.pp
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/manifests/node.pp b/bigtop_toolchain/manifests/node.pp
new file mode 100644
index 0000000..517f9e1
--- /dev/null
+++ b/bigtop_toolchain/manifests/node.pp
@@ -0,0 +1,40 @@
+# 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.
+
+class bigtop_toolchain::node {
+ $node_version = "0.10.44"
+ $brunch_version = "1.7.20"
+ $node_name = "node-v${node_version}-linux-x64"
+ $node_dl_url = 'https://nodejs.org/dist/v$node_version/'
+
+ exec { "get node":
+ command => "/usr/bin/wget -O - https://nodejs.org/dist/v${node_version}/${node_name}.tar.gz | /usr/bin/tar xzf -",
+ cwd => "/usr/local",
+ unless => "/usr/bin/test -x /usr/local/${node_name}/bin/npm",
+ }
+
+ file { "/usr/local/node":
+ ensure => link,
+ target => "/usr/local/${node_name}",
+ require => Exec["get node"],
+ }
+
+ exec { "install brunch":
+ command => "/usr/local/node/bin/npm install -g brunch@${brunch_version}",
+ cwd => "/usr/local",
+ creates => "/usr/local/node/bin/brunch",
+ require => File["/usr/local/node"],
+ }
+}
http://git-wip-us.apache.org/repos/asf/bigtop/blob/67c7d90c/bigtop_toolchain/templates/jenkins.sh
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/templates/jenkins.sh b/bigtop_toolchain/templates/jenkins.sh
index 31e3ecd..7492742 100644
--- a/bigtop_toolchain/templates/jenkins.sh
+++ b/bigtop_toolchain/templates/jenkins.sh
@@ -17,6 +17,7 @@ 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 NODE_HOME=/usr/local/node
+export PATH=$MAVEN_HOME/bin:$ANT_HOME/bin:$GRADLE_HOME/bin:$NODE_HOME/bin:$PATH
export GRADLE_OPTS="-Dorg.gradle.daemon=true"