[2/7] docker: do not display deprecated images in 'make docker' help

Message ID 20180112125000.27256-3-f4bug@amsat.org
State New
Headers show
Series
  • Untitled series #22940
Related show

Commit Message

Philippe Mathieu-Daudé Jan. 12, 2018, 12:49 p.m.
the 'debian' base image is deprecated since 3e11974988d8

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 tests/docker/Makefile.include | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Fam Zheng Jan. 17, 2018, 2:10 a.m. | #1
On 01/12/2018 08:49 PM, Philippe Mathieu-Daudé wrote:
> the 'debian' base image is deprecated since 3e11974988d8
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>   tests/docker/Makefile.include | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
> index ef95703cef..f0cd26c2b6 100644
> --- a/tests/docker/Makefile.include
> +++ b/tests/docker/Makefile.include
> @@ -4,7 +4,8 @@
>   
>   DOCKER_SUFFIX := .docker
>   DOCKER_FILES_DIR := $(SRC_PATH)/tests/docker/dockerfiles
> -DOCKER_IMAGES := $(sort $(notdir $(basename $(wildcard $(DOCKER_FILES_DIR)/*.docker))))
> +DOCKER_DEPRECATED_IMAGES := debian
> +DOCKER_IMAGES := $(filter-out $(DOCKER_DEPRECATED_IMAGES),$(sort $(notdir $(basename $(wildcard $(DOCKER_FILES_DIR)/*.docker)))))
>   DOCKER_TARGETS := $(patsubst %,docker-image-%,$(DOCKER_IMAGES))
>   # Use a global constant ccache directory to speed up repetitive builds
>   DOCKER_CCACHE_DIR := $$HOME/.cache/qemu-docker-ccache

While we are at it, could you please just spell out this list 
explicitly, consistent to how we build obj-y variables?
Philippe Mathieu-Daudé Jan. 17, 2018, 1:38 p.m. | #2
On 01/16/2018 11:10 PM, Fam Zheng wrote:
> On 01/12/2018 08:49 PM, Philippe Mathieu-Daudé wrote:
>> the 'debian' base image is deprecated since 3e11974988d8
>>
>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>> ---
>>   tests/docker/Makefile.include | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/tests/docker/Makefile.include
>> b/tests/docker/Makefile.include
>> index ef95703cef..f0cd26c2b6 100644
>> --- a/tests/docker/Makefile.include
>> +++ b/tests/docker/Makefile.include
>> @@ -4,7 +4,8 @@
>>     DOCKER_SUFFIX := .docker
>>   DOCKER_FILES_DIR := $(SRC_PATH)/tests/docker/dockerfiles
>> -DOCKER_IMAGES := $(sort $(notdir $(basename $(wildcard
>> $(DOCKER_FILES_DIR)/*.docker))))
>> +DOCKER_DEPRECATED_IMAGES := debian
>> +DOCKER_IMAGES := $(filter-out $(DOCKER_DEPRECATED_IMAGES),$(sort
>> $(notdir $(basename $(wildcard $(DOCKER_FILES_DIR)/*.docker)))))
>>   DOCKER_TARGETS := $(patsubst %,docker-image-%,$(DOCKER_IMAGES))
>>   # Use a global constant ccache directory to speed up repetitive builds
>>   DOCKER_CCACHE_DIR := $$HOME/.cache/qemu-docker-ccache
> 
> While we are at it, could you please just spell out this list
> explicitly, consistent to how we build obj-y variables?

What I like with the current approach is one can have
more/different/specific images to run the tests, without having to
pollute upstream with plenty of more docker images (you just drop your
Dockerfile in DOCKER_FILES_DIR and 'make docker-test' run them all).

Patch

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index ef95703cef..f0cd26c2b6 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -4,7 +4,8 @@ 
 
 DOCKER_SUFFIX := .docker
 DOCKER_FILES_DIR := $(SRC_PATH)/tests/docker/dockerfiles
-DOCKER_IMAGES := $(sort $(notdir $(basename $(wildcard $(DOCKER_FILES_DIR)/*.docker))))
+DOCKER_DEPRECATED_IMAGES := debian
+DOCKER_IMAGES := $(filter-out $(DOCKER_DEPRECATED_IMAGES),$(sort $(notdir $(basename $(wildcard $(DOCKER_FILES_DIR)/*.docker)))))
 DOCKER_TARGETS := $(patsubst %,docker-image-%,$(DOCKER_IMAGES))
 # Use a global constant ccache directory to speed up repetitive builds
 DOCKER_CCACHE_DIR := $$HOME/.cache/qemu-docker-ccache