From dd31335e78fa1ed7fcc84124ffe799be0d2b4679 Mon Sep 17 00:00:00 2001 From: Seth Call Date: Sun, 18 Nov 2012 00:03:00 -0600 Subject: [PATCH] * adding example jenkins to the mix --- Gemfile | 2 ++ jenkins | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100755 jenkins diff --git a/Gemfile b/Gemfile index 7f7d5888b..0f7889e6e 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,5 @@ +#ruby=1.9.3 + source 'https://rubygems.org' workspace = ENV["WORKSPACE"] || "~/workspace" diff --git a/jenkins b/jenkins new file mode 100755 index 000000000..2d3bb662f --- /dev/null +++ b/jenkins @@ -0,0 +1,25 @@ +#!/bin/bash + +GEM_SERVER=http://localhost:9000/gems + +echo "starting build..." +./build + +if [ "$?" = "0" ]; then + echo "build succeeded" + echo "publishing gem" + pushd "target/ruby/jampb" + find . -name *.gem -exec curl -f -T {} $GEM_SERVER/{} \; + + if [ "$?" != "0" ]; then + echo "publish failed" + exit 1 + fi + popd + echo "done publishing gems" +else + echo "build failed" + exit 1 +fi + +