Bug 1291070 - Return process exit code properly; r=glandium
Before, we were returning None, which gets converted to 0.
Derp.
Also fix a flake8 failure introduced by 9f5fbb3066c9.
We'll also need to generate a new decision image. But that will
require someone with TC privileges to be around. That can be done
in a separate commit to unblock this from landing and fixing
consumers of run-task that aren't the decision image.
MozReview-Commit-ID: 6XuoIxjDozF
--- a/taskcluster/taskgraph/task/docker_image.py
+++ b/taskcluster/taskgraph/task/docker_image.py
@@ -68,18 +68,19 @@ class DockerImageTask(base.Task):
image_parameters = dict(parameters)
image_parameters['context_path'] = context_path
image_parameters['artifact_path'] = 'public/image.tar'
image_parameters['image_name'] = image_name
image_artifact_path = \
"public/docker_image_contexts/{}/context.tar.gz".format(image_name)
if os.environ.get('TASK_ID'):
- # We put image context tar balls in a different artifacts folder on the
- # Gecko decision task in order to have longer expiration dates for smaller artifacts
+ # We put image context tar balls in a different artifacts folder
+ # on the Gecko decision task in order to have longer expiration
+ # dates for smaller artifacts.
destination = os.path.join(
os.environ['HOME'],
"docker_image_contexts/{}/context.tar.gz".format(image_name))
image_parameters['context_url'] = ARTIFACT_URL.format(
os.environ['TASK_ID'], image_artifact_path)
destination = os.path.abspath(destination)
if not os.path.exists(os.path.dirname(destination)):
--- a/testing/docker/recipes/run-task
+++ b/testing/docker/recipes/run-task
@@ -56,17 +56,17 @@ def run_and_prefix_output(prefix, args):
while True:
data = p.stdout.readline()
if data == '':
break
print_line(prefix, data)
- return p.returncode
+ return p.wait()
def vcs_checkout(args):
# TODO get VCS parameters from arguments.
base_repo = os.environ.get('GECKO_BASE_REPOSITORY')
# We set the base repository to mozilla-central so tc-vcs doesn't get
# confused. Switch to mozilla-unified because robustcheckout works best