diff options
Diffstat (limited to 'docs/gl_objects/builds.py')
-rw-r--r-- | docs/gl_objects/builds.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/gl_objects/builds.py b/docs/gl_objects/builds.py index 4b663c6..c535cb2 100644 --- a/docs/gl_objects/builds.py +++ b/docs/gl_objects/builds.py @@ -77,6 +77,19 @@ project.builds.get(build_id) build.artifacts() # end artifacts +# stream artifacts +class Foo(object): + def __init__(self): + self._fd = open('artifacts.zip', 'w') + + def __call__(self, chunk): + self._fd.write(chunk) + +target = Foo() +build.artifacts(streamed=True, streamed=True, action=target) +del(target) # flushes data on disk +# end stream artifacts + # keep artifacts build.keep_artifacts() # end keep artifacts |