Skip to content

Instantly share code, notes, and snippets.

@garethr
Created July 11, 2010 17:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save garethr/471712 to your computer and use it in GitHub Desktop.
Save garethr/471712 to your computer and use it in GitHub Desktop.
post-receive git hook for integrity continuous integration server
#!/usr/bin/env ruby
require 'net/http'
# This is a post-receive git hook designed to tirgger a build in the
# Integrity continuous integration server
INTEGRITY = 'http://localhost:9292'
PROJECT = 'site'
uri = URI.parse("#{INTEGRITY}/#{PROJECT}/builds")
post_req = Net::HTTP::Post.new(uri.path)
post_req.set_form_data({}, ';')
req = Net::HTTP.new(uri.host, uri.port)
req.start {|http| http.request(post_req)}
puts "Running Integrity build"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment