Commit d3830116 authored by Georges Racinet's avatar Georges Racinet 🦑
Browse files

Heptapod: return output of rake commands

Will be useful for assertions

--HG--
branch : heptapod-0-14
parent 34b54f1fa6ae
......@@ -487,7 +487,8 @@ class DockerHeptapod(Heptapod):
def rake(self, *args):
cmd = ['gitlab-rake']
cmd.extend(args)
self.run_shell(cmd, user='git')
code, out = self.execute(cmd, user='git')
return out.encode() # Consistency with HDK (returns bytes)
def remove_all_backups(self):
# using find in order not to rely on shell expansion for *.tar
......@@ -555,6 +556,7 @@ class SourceHeptapod(Heptapod):
command=command,
exit_code=exit_code,
))
return output
def put_archive(self, dest, path, owner='git'):
if owner != 'git':
......@@ -605,7 +607,7 @@ class GdkHeptapod(SourceHeptapod):
cmd = ['bundle', 'exec', 'rake']
cmd.extend(args)
logger.debug("GdkHeptapod: calling %r", cmd)
subprocess.check_call(cmd, cwd=self.rails_root)
return subprocess.check_output(cmd, cwd=self.rails_root)
def gitlab_ctl(self, command, services=None):
base_cmd = ('gdk', command)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment