Fix API exception in trigger setup due to invalid Dockerfile path
This commit is contained in:
parent
04c9b6568c
commit
a15abd3b5c
5 changed files with 10 additions and 4 deletions
|
@ -290,7 +290,10 @@ class BuildTriggerHandler(object):
|
|||
def get_dockerfile_path(self):
|
||||
""" Returns the normalized path to the Dockerfile found in the subdirectory
|
||||
in the config. """
|
||||
return self.config.get('subdir', '')
|
||||
dockerfile_path = self.config.get('subdir') or 'Dockerfile'
|
||||
if dockerfile_path[0] == '/':
|
||||
dockerfile_path = dockerfile_path[1:]
|
||||
return dockerfile_path
|
||||
|
||||
def prepare_build(self, metadata, is_manual=False):
|
||||
# Ensure that the metadata meets the scheme.
|
||||
|
|
Reference in a new issue