[dockers] Build stretch dockers only once and only in stretch slave docker (#2678)
Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
This commit is contained in:
parent
145c1348b3
commit
c0caf0c372
@ -6,9 +6,9 @@ $(DOCKER_SYNCD_MLNX_RPC)_DEPENDS += $(SYNCD_RPC) $(LIBTHRIFT)
|
||||
$(DOCKER_SYNCD_MLNX_RPC)_PYTHON_DEBS += $(MLNX_SFPD)
|
||||
$(DOCKER_SYNCD_MLNX_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_MLNX)
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_MLNX_RPC)
|
||||
SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_MLNX_RPC)
|
||||
ifeq ($(ENABLE_SYNCD_RPC),y)
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_MLNX_RPC)
|
||||
SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_MLNX_RPC)
|
||||
endif
|
||||
|
||||
$(DOCKER_SYNCD_MLNX_RPC)_CONTAINER_NAME = syncd
|
||||
|
@ -6,9 +6,9 @@ $(DOCKER_SYNCD_MLNX)_DEPENDS += $(SYNCD) $(PYTHON_SDK_API)
|
||||
$(DOCKER_SYNCD_MLNX)_PYTHON_DEBS += $(MLNX_SFPD)
|
||||
$(DOCKER_SYNCD_MLNX)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_STRETCH)
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_MLNX)
|
||||
SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_MLNX)
|
||||
ifneq ($(ENABLE_SYNCD_RPC),y)
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_MLNX)
|
||||
SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_MLNX)
|
||||
endif
|
||||
|
||||
$(DOCKER_SYNCD_MLNX)_CONTAINER_NAME = syncd
|
||||
|
@ -15,4 +15,4 @@ STRACE = strace
|
||||
$(DOCKER_BASE_STRETCH)_DBG_PACKAGES += $(GDB) $(GDBSERVER) $(VIM) $(OPENSSH) $(SSHPASS) $(STRACE)
|
||||
endif
|
||||
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_BASE_STRETCH)
|
||||
SONIC_STRETCH_DOCKERS += $(DOCKER_BASE_STRETCH)
|
||||
|
@ -5,4 +5,4 @@ $(DOCKER_CONFIG_ENGINE_STRETCH)_PATH = $(DOCKERS_PATH)/docker-config-engine-stre
|
||||
$(DOCKER_CONFIG_ENGINE_STRETCH)_PYTHON_WHEELS += $(SWSSSDK_PY2)
|
||||
$(DOCKER_CONFIG_ENGINE_STRETCH)_PYTHON_WHEELS += $(SONIC_CONFIG_ENGINE)
|
||||
$(DOCKER_CONFIG_ENGINE_STRETCH)_LOAD_DOCKERS += $(DOCKER_BASE_STRETCH)
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_CONFIG_ENGINE_STRETCH)
|
||||
SONIC_STRETCH_DOCKERS += $(DOCKER_CONFIG_ENGINE_STRETCH)
|
||||
|
14
slave.mk
14
slave.mk
@ -464,8 +464,16 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_SIMPLE_DOCKER_IMAGES)) : $(TARGET_PATH)/%.g
|
||||
|
||||
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
|
||||
ifeq ($(BLDENV),stretch)
|
||||
DOCKER_IMAGES := $(SONIC_STRETCH_DOCKERS)
|
||||
else
|
||||
DOCKER_IMAGES := $(filter-out $(SONIC_STRETCH_DOCKERS), $(SONIC_DOCKER_IMAGES))
|
||||
endif
|
||||
|
||||
# Targets for building docker images
|
||||
$(addprefix $(TARGET_PATH)/, $(SONIC_DOCKER_IMAGES)) : $(TARGET_PATH)/%.gz : .platform docker-start \
|
||||
$(addprefix $(TARGET_PATH)/, $(DOCKER_IMAGES)) : $(TARGET_PATH)/%.gz : .platform docker-start \
|
||||
$$(addprefix $(DEBS_PATH)/,$$($$*.gz_DEPENDS)) \
|
||||
$$(addprefix $(FILES_PATH)/,$$($$*.gz_FILES)) \
|
||||
$$(addprefix $(PYTHON_DEBS_PATH)/,$$($$*.gz_PYTHON_DEBS)) \
|
||||
@ -506,11 +514,11 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_DOCKER_IMAGES)) : $(TARGET_PATH)/%.gz : .pl
|
||||
if [ -f $($*.gz_PATH).patch/series ]; then pushd $($*.gz_PATH) && quilt pop -a -f; popd; fi
|
||||
$(FOOTER)
|
||||
|
||||
SONIC_TARGET_LIST += $(addprefix $(TARGET_PATH)/, $(SONIC_DOCKER_IMAGES))
|
||||
SONIC_TARGET_LIST += $(addprefix $(TARGET_PATH)/, $(DOCKER_IMAGES))
|
||||
|
||||
DOCKER_LOAD_TARGETS = $(addsuffix -load,$(addprefix $(TARGET_PATH)/, \
|
||||
$(SONIC_SIMPLE_DOCKER_IMAGES) \
|
||||
$(SONIC_DOCKER_IMAGES)))
|
||||
$(DOCKER_IMAGES)))
|
||||
$(DOCKER_LOAD_TARGETS) : $(TARGET_PATH)/%.gz-load : .platform docker-start $$(TARGET_PATH)/$$*.gz
|
||||
$(HEADER)
|
||||
docker load -i $(TARGET_PATH)/$*.gz $(LOG)
|
||||
|
Loading…
Reference in New Issue
Block a user