44a61f93b3
Upstream-commit: bb61678b570fabeb5d21c86fa3f7b5456111f7a2 Component: engine
22 lines
548 B
Python
Executable File
22 lines
548 B
Python
Executable File
#!/usr/bin/env python
|
|
|
|
'''Trigger buildbot docker test build
|
|
|
|
post-commit git hook designed to automatically trigger buildbot on
|
|
the provided vagrant docker VM.'''
|
|
|
|
import requests
|
|
|
|
USERNAME = 'buildbot'
|
|
PASSWORD = 'docker'
|
|
BASE_URL = 'http://localhost:8010'
|
|
path = lambda s: BASE_URL + '/' + s
|
|
|
|
try:
|
|
session = requests.session()
|
|
session.post(path('login'),data={'username':USERNAME,'passwd':PASSWORD})
|
|
session.post(path('builders/docker/force'),
|
|
data={'forcescheduler':'trigger','reason':'Test commit'})
|
|
except:
|
|
pass
|