From 9896291cd4f04519acc33ceeb5f9149174b2eb81 Mon Sep 17 00:00:00 2001 From: Alex Yang Date: Fri, 17 Mar 2017 08:57:39 +0800 Subject: use local cirros image in post-deploy script In daisy building job, cirros image is packed in daisy image file. And it would be copied to /var/lib/daisy/images/ directory after daisy installed. The post-deploy script can use it locally. Change-Id: I45adbdd8b7c87b574367820076f6019638310ed8 Signed-off-by: Alex Yang --- deploy/post/execute.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'deploy') diff --git a/deploy/post/execute.py b/deploy/post/execute.py index b9665e10..288e949b 100644 --- a/deploy/post/execute.py +++ b/deploy/post/execute.py @@ -64,7 +64,7 @@ def _prepare_cirros(): url = 'http://download.cirros-cloud.net' version = '0.3.5' name = 'cirros-{}-x86_64-disk.img'.format(version) - img = os.path.join(os.path.abspath(os.path.dirname(__file__)), name) + img = os.path.join("/var/lib/daisy/images", name) if not os.path.isfile(img): cmd = "wget %(url)s/%(version)s/%(name)s -O %(path)s" % { 'url': url, -- cgit 1.2.3-korg