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

@ -16,13 +16,13 @@ def test_list_build_subdirs(bitbucket_trigger):
assert bitbucket_trigger.list_build_subdirs() == ["/Dockerfile"]
@pytest.mark.parametrize('subdir, contents', [
@pytest.mark.parametrize('dockerfile_path, contents', [
('/Dockerfile', 'hello world'),
('somesubdir/Dockerfile', 'hi universe'),
('unknownpath', None),
])
def test_load_dockerfile_contents(subdir, contents):
trigger = get_bitbucket_trigger(subdir)
def test_load_dockerfile_contents(dockerfile_path, contents):
trigger = get_bitbucket_trigger(dockerfile_path)
assert trigger.load_dockerfile_contents() == contents