Skip to content

Commit

Permalink
[build]: only build dockers needed by installers (#2771)
Browse files Browse the repository at this point in the history
Signed-off-by: Guohan Lu <gulv@microsoft.com>
  • Loading branch information
lguohan authored Apr 12, 2019
1 parent 0a6dd88 commit 158531b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion slave.mk
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,10 @@ SONIC_TARGET_LIST += $(addprefix $(TARGET_PATH)/, $(SONIC_SIMPLE_DOCKER_IMAGES))

# Build stretch docker images only in stretch slave docker,
# jessie docker images only in jessie slave docker
DOCKER_IMAGES_FOR_INSTALLERS := $(sort $(foreach installer,$(SONIC_INSTALLERS),$($(installer)_DOCKERS)))
ifeq ($(BLDENV),stretch)
DOCKER_IMAGES := $(SONIC_STRETCH_DOCKERS)
SONIC_STRETCH_DOCKERS_FOR_INSTALLERS = $(filter $(SONIC_STRETCH_DOCKERS),$(DOCKER_IMAGES_FOR_INSTALLERS))
else
DOCKER_IMAGES := $(filter-out $(SONIC_STRETCH_DOCKERS), $(SONIC_DOCKER_IMAGES))
endif
Expand Down Expand Up @@ -681,7 +683,7 @@ all : .platform $$(addprefix $(TARGET_PATH)/,$$(SONIC_ALL))

stretch : $$(addprefix $(DEBS_PATH)/,$$(SONIC_STRETCH_DEBS)) \
$$(addprefix $(FILES_PATH)/,$$(SONIC_STRETCH_FILES)) \
$$(addprefix $(TARGET_PATH)/,$$(SONIC_STRETCH_DOCKERS))
$$(addprefix $(TARGET_PATH)/,$$(SONIC_STRETCH_DOCKERS_FOR_INSTALLERS))


###############################################################################
Expand Down

0 comments on commit 158531b

Please sign in to comment.