forked from moonhouse/imageproxy
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Petter Wigle
committed
May 16, 2012
1 parent
18b6228
commit d069921
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/ruby | ||
|
||
# This whole thing works without bundle install. | ||
# Pure Ruby, just as Jenkins likes it ;) | ||
|
||
require 'net/http' | ||
require 'cgi' | ||
|
||
module CI | ||
module Chat | ||
def self.say(message, color='purple') | ||
params = {:m => message, :color => color} | ||
path = "/hubot?".concat(params.collect { |k,v| "#{k}=#{CGI::escape(v.to_s)}" }.join('&')) | ||
Net::HTTP.start('localhost', 5777) { |http| http.get(path) } | ||
end | ||
end | ||
end | ||
|
||
def jenkins_link(title='logs') | ||
%{<a href="#{ENV['BUILD_URL']}consoleFull">#{title}</a>} | ||
end | ||
|
||
if system %{ bash -l -c 'cd $(pwd) && (hash bundle 2>&- || { gem install bundler;}) && (bundle check || bundle install) && (rbenv rehash || echo "Faking rbenvs exit code" ) && script/ci/bin/setup && bundle exec rake spec' } | ||
CI::Chat.say "ImageProxy CI #{jenkins_link('succeeded')}.", :green | ||
else | ||
CI::Chat.say "ImageProxy CI #{jenkins_link('failed')}.", :red | ||
abort | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
for f in config/*.in | ||
do | ||
dest=`echo $f |sed s/\.in//` | ||
cp $f $dest | ||
done | ||
|