feat(build runner): added in context, dockerfile_location

this is a new feature meant to allow people to use any file as
  a dockerfile and any folder as a context directory
This commit is contained in:
Charlton Austin 2017-03-21 17:24:11 -04:00
parent 90b130fe16
commit e6d201e0b0
29 changed files with 531 additions and 111 deletions

View file

@ -54,6 +54,7 @@ def start_build(repository, prepared_build, pull_robot_name=None):
'docker_tags': prepared_build.tags,
'registry': host,
'build_subdir': prepared_build.subdirectory,
'context': prepared_build.context,
'trigger_metadata': prepared_build.metadata or {},
'is_manual': prepared_build.is_manual,
'manual_user': get_authenticated_user().username if get_authenticated_user() else None,
@ -122,6 +123,7 @@ class PreparedBuild(object):
self._tags = None
self._build_name = None
self._subdirectory = None
self._context = None
self._metadata = None
self._trigger = trigger
self._is_manual = None
@ -224,6 +226,20 @@ class PreparedBuild(object):
self._subdirectory = value
@property
def context(self):
if self._context is None:
raise Exception('Missing property context')
return self._context
@context.setter
def context(self, value):
if self._context:
raise Exception('Property context already set')
self._context = value
@property
def metadata(self):
if self._metadata is None: