Prepare the build worker to support multiple tags and subdirectories. Change the build database config to accept a job config object instead of breaking out the parameters into independent blocks.

This commit is contained in:
jakedt 2014-02-24 16:11:23 -05:00
parent 4b0f4c0a7b
commit 13dea98499
9 changed files with 114 additions and 53 deletions

View file

@ -309,7 +309,6 @@ def populate_database():
False, [], (0, [], None))
token = model.create_access_token(building, 'write')
tag = 'ci.devtable.com:5000/%s/%s' % (building.namespace, building.name)
trigger = model.create_build_trigger(building, 'github', '123authtoken',
new_user_1)
@ -318,9 +317,15 @@ def populate_database():
})
trigger.save()
build = model.create_repository_build(building, token,
'701dcc3724fb4f2ea6c31400528343cd',
tag, 'build-name', trigger)
repo = 'ci.devtable.com:5000/%s/%s' % (building.namespace, building.name)
job_config = {
'repository': repo,
'docker_tags': ['latest'],
'build_subdir': '',
'resource_key': '701dcc3724fb4f2ea6c31400528343cd',
}
build = model.create_repository_build(building, token, job_config,
'build-name', trigger)
build.uuid = 'deadbeef-dead-beef-dead-beefdeadbeef'
build.save()