Files
docker-cli/components/engine/buildbot/buildbot-cfg/post-commit
Daniel Mizyrycki 226b7e3c89 testing: Make postcommit more generic
Upstream-commit: d2c1850fb5a210d59b87dcb8504c8c24b60cca3c
Component: engine
2013-04-10 11:32:48 -07:00

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