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
|
@ -13,12 +13,12 @@ def bitbucket_trigger():
|
|||
|
||||
|
||||
def test_list_build_subdirs(bitbucket_trigger):
|
||||
assert bitbucket_trigger.list_build_subdirs() == ['']
|
||||
assert bitbucket_trigger.list_build_subdirs() == ["/Dockerfile"]
|
||||
|
||||
|
||||
@pytest.mark.parametrize('subdir, contents', [
|
||||
('', 'hello world'),
|
||||
('somesubdir', 'hi universe'),
|
||||
('/Dockerfile', 'hello world'),
|
||||
('somesubdir/Dockerfile', 'hi universe'),
|
||||
('unknownpath', None),
|
||||
])
|
||||
def test_load_dockerfile_contents(subdir, contents):
|
||||
|
|
Reference in a new issue