grim/local-pipelines

4a1c9b4915d2
Merge in some basic changes Sean took care of
--- a/pipelines/pipeline.py Mon Jul 25 15:30:08 2016 -0500
+++ b/pipelines/pipeline.py Mon Jul 25 17:06:03 2016 -0500
@@ -29,6 +29,7 @@
def _build_script(self, step):
fd, filename = tempfile.mkstemp(prefix='pipeline', suffix='.sh')
+ filename = os.path.realpath(filename)
with os.fdopen(fd, "w") as ofp:
content = " && \\\n".join(step["script"])
@@ -63,7 +64,7 @@
def _commands(self):
commands = []
print(self.steps)
- print('-'*40)
+ print('-' * 40)
for container in self.steps:
step = container["step"]
commands.append(self.get_command(step))
--- a/pipelines/vcs.py Mon Jul 25 15:30:08 2016 -0500
+++ b/pipelines/vcs.py Mon Jul 25 17:06:03 2016 -0500
@@ -1,5 +1,6 @@
# vi:et:ts=4 sw=4 sts=4
+import os
import subprocess
@@ -15,7 +16,8 @@
for _, cmd in _VCSS.iteritems():
try:
command = cmd.format(path)
- branch = subprocess.check_output(command.split())
+ branch = subprocess.check_output(command.split(),
+ stderr=open(os.devnull, 'w'))
branch = branch.strip()
except subprocess.CalledProcessError:
pass