Skip to content

Instantly share code, notes, and snippets.

@jmeridth
Created August 24, 2010 02:22
Show Gist options
  • Select an option

  • Save jmeridth/546792 to your computer and use it in GitHub Desktop.

Select an option

Save jmeridth/546792 to your computer and use it in GitHub Desktop.
teamcity post_receive git hook
#!/usr/bin/env ruby
branches_to_build = ["master","develop","release1"]
while (input = STDIN.read) != ''
rev_old, rev_new, ref = input.split(" ")
if ref =~ /#{branches_to_build.join("|")}#/
# figure out your teamcity build url via help from http://bit.ly/dAFVO3
url="https://username:[email protected]/httpAuth/action.html?add2Queue=bt2"
puts "Run CI build for application"
# avoid check of self signed-certificates
`curl --insecure #{url} > /dev/null 2>&1`
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment