From 953792775b084e5b5b25a6718b8372778e47749d Mon Sep 17 00:00:00 2001 From: Alexander Allen Date: Wed, 20 Apr 2022 16:03:55 +0000 Subject: [PATCH 1/2] Add logging for slave container builds --- Makefile.work | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile.work b/Makefile.work index a5ecab1ab58b..b4b9ea95708e 100644 --- a/Makefile.work +++ b/Makefile.work @@ -246,12 +246,18 @@ endif endif +SPLIT_LOG = | tee + +DOCKER_BASE_LOG = $(SLAVE_DIR)/$(SLAVE_BASE_IMAGE)_$(SLAVE_BASE_TAG).log +DOCKER_LOG = $(SLAVE_DIR)/$(SLAVE_IMAGE)_$(SLAVE_TAG).log + + DOCKER_BASE_BUILD = docker build --no-cache \ -t $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) \ --build-arg http_proxy=$(http_proxy) \ --build-arg https_proxy=$(https_proxy) \ --build-arg no_proxy=$(no_proxy) \ - $(SLAVE_DIR) + $(SLAVE_DIR) $(SPLIT_LOG) $(DOCKER_BASE_LOG) DOCKER_BASE_PULL = docker pull \ $(REGISTRY_SERVER):$(REGISTRY_PORT)/$(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) @@ -264,7 +270,7 @@ DOCKER_BUILD = docker build --no-cache \ --build-arg slave_base_tag_ref=$(SLAVE_BASE_TAG) \ -t $(SLAVE_IMAGE):$(SLAVE_TAG) \ -f $(SLAVE_DIR)/Dockerfile.user \ - $(SLAVE_DIR) + $(SLAVE_DIR) $(SPLIT_LOG) $(DOCKER_LOG) SONIC_BUILD_INSTRUCTION := make \ -f slave.mk \ From c84e01d4da26e869c4fd0954035b1c2a8ce5b8d0 Mon Sep 17 00:00:00 2001 From: Alexander Allen Date: Thu, 26 May 2022 00:42:34 +0000 Subject: [PATCH 2/2] Add new logs to gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 49861324aa1d..5f6f41b1a09c 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,9 @@ target/ *.img *.pyc +# Slave docker log files +sonic-slave*/*.log + # Autogenerated Dockerfiles sonic-slave*/Dockerfile sonic-slave*/Dockerfile.user