Pass trigger information on build status. Set up a trigger for the sample building repository. Allow to list the builds started from a trigger. Protect the callback with the proper auth for creating a trigger on a repo.

This commit is contained in:
jakedt 2014-02-19 16:08:33 -05:00
parent f60f9eb62a
commit 9e426816a5
7 changed files with 94 additions and 43 deletions

View file

@ -281,8 +281,17 @@ def populate_database():
token = model.create_access_token(building, 'write')
tag = 'ci.devtable.com:5000/%s/%s' % (building.namespace, building.name)
build = model.create_repository_build(building, token, '701dcc3724fb4f2ea6c31400528343cd',
tag, 'build-name')
trigger = model.create_build_trigger(building, 'github', '123authtoken',
new_user_1)
trigger.config = json.dumps({
'build_source': 'jakedt/testconnect',
})
trigger.save()
build = model.create_repository_build(building, token,
'701dcc3724fb4f2ea6c31400528343cd',
tag, 'build-name', trigger)
build.uuid = 'deadbeef-dead-beef-dead-beefdeadbeef'
build.save()