feat(buildtrigger): allow use to specify dockerfile
users can only specify the folder and the dockerfile must be names "Dockerfile" this allows users to specify the file and it can be called "Dockerfile" or <some name>.Dockerfile
This commit is contained in:
parent
aa2f88d321
commit
e30cd931d1
12 changed files with 50 additions and 42 deletions
|
@ -1,4 +1,5 @@
|
|||
import logging
|
||||
import os
|
||||
|
||||
from calendar import timegm
|
||||
from functools import wraps
|
||||
|
@ -341,11 +342,7 @@ class GitLabBuildTrigger(BuildTriggerHandler):
|
|||
msg = 'Unable to find GitLab repository tree for source: %s' % new_build_source
|
||||
raise RepositoryReadException(msg)
|
||||
|
||||
for node in repo_tree:
|
||||
if node['name'] == 'Dockerfile':
|
||||
return ['']
|
||||
|
||||
return []
|
||||
return ["/"+node['name'] for node in repo_tree if self.path_is_dockerfile(node['name'])]
|
||||
|
||||
@_catch_timeouts
|
||||
def load_dockerfile_contents(self):
|
||||
|
|
Reference in a new issue