From 6fe3ae3f194a675a3b73b6beab3ed5dd35db3be3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alex=20Benn=C3=A9e?= Date: Tue, 25 Jul 2017 14:34:23 +0100 Subject: [PATCH] docker: docker.py make --no-cache skip checksum test MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit If you invoke with NOCACHE=1 we pass --no-cache in the argv to docker.py but may still not force a rebuild if the dockerfile checksum hasn't changed. By testing for its presence we can force builds without having to manually remove the docker image. Signed-off-by: Alex Bennée Message-Id: <20170725133425.436-5-alex.bennee@linaro.org> Signed-off-by: Fam Zheng --- tests/docker/docker.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 81c87ee329..08122ca17d 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -263,7 +263,8 @@ class BuildCommand(SubCommand): tag = args.tag dkr = Docker() - if dkr.image_matches_dockerfile(tag, dockerfile): + if "--no-cache" not in argv and \ + dkr.image_matches_dockerfile(tag, dockerfile): if not args.quiet: print "Image is up to date." else: -- 2.30.2