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
No hay comentarios:
Publicar un comentario