Mostrando las entradas con la etiqueta hudson svn hook trac. Mostrar todas las entradas
Mostrando las entradas con la etiqueta hudson svn hook trac. Mostrar todas las entradas

21 septiembre 2009

SVN hooks for hudson builds

En el directorio hooks del repositorio renombramos/copiamos post-commit.bat (o .exe)

en el fichero post-commit.bat escribimos:

python C:\svnrepos\notify_hudson.py




escribir este script en un fichero llamado notify_hudson.py:


import urllib, urllib2, time

url = 'http://localhost:8080/hudson/job/seam4hudson/build?token=build&cause=svncommit+texto'

values = {'token' : 'build', #write ur specific key/value pair
'key2' : 'value2',
'key3' : 'value3',
}

try:
# data = urllib.urlencode(values)
req = urllib2.Request(url)
response = urllib2.urlopen(req)
the_page = response.read()
print the_page
except Exception, detail:
print "Err ", detail




script sacado de http://love-python.blogspot.com/2008/04/get-content-html-source-of-url-by-http.html