From 1df151eb4133189b84e5a5ffae98776e48b5e813 Mon Sep 17 00:00:00 2001 From: Carlos Konstanski Date: Fri, 27 Oct 2017 19:03:08 -0600 Subject: jenkins scripting --- ci-script.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ci-script.py') diff --git a/ci-script.py b/ci-script.py index 5a0ffe1..678f3b6 100755 --- a/ci-script.py +++ b/ci-script.py @@ -35,9 +35,9 @@ def check_image_tag_current(glance, manifest): def create_image(env, manifest): cmd = "disk-image-create %s -t %s -o /tmp/%s.%s 2>&1" % (manifest["elements"], manifest["image_type"], manifest["image_name"], manifest["image_type"]) - env = manifest["extra_envs"] if "extra_envs" in manifest else {} - env["ELEMENTS_PATH"] = env.elements_path - p = subprocess.Popen([cmd], shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env) + environ = manifest["extra_envs"] if "extra_envs" in manifest else {} + environ["ELEMENTS_PATH"] = env.elements_path + p = subprocess.Popen([cmd], shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=environ) out, err = p.communicate() if p.returncode != 0: raise Exception("Error running diskimage-builder:\n%s\n%s" % (out, err)) -- cgit v1.3