From 04c903c8de475981a8fa69779db171ebc9104c86 Mon Sep 17 00:00:00 2001 From: Andrew Kroh Date: Thu, 25 Jan 2024 10:48:49 -0500 Subject: [PATCH 1/2] Make npcap image build fail if installer is not present (#383) --- go/Makefile.common | 2 +- go/npcap/Dockerfile.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/go/Makefile.common b/go/Makefile.common index 25871872..f90ba908 100644 --- a/go/Makefile.common +++ b/go/Makefile.common @@ -7,7 +7,7 @@ DEBIAN_VERSION ?= 9 SUFFIX := -$(shell basename $(CURDIR)) TAG_EXTENSION ?= -export DEBIAN_VERSION TAG_EXTENSION +export DEBIAN_VERSION TAG_EXTENSION NPCAP_FILE DOCKER_CMD := docker build diff --git a/go/npcap/Dockerfile.tmpl b/go/npcap/Dockerfile.tmpl index c13b39f0..c8fc4722 100644 --- a/go/npcap/Dockerfile.tmpl +++ b/go/npcap/Dockerfile.tmpl @@ -3,7 +3,7 @@ ARG VERSION ARG TAG_EXTENSION='' FROM ${REPOSITORY}/golang-crossbuild:${VERSION}-main${TAG_EXTENSION} -COPY lib /installer +COPY lib/{{.NPCAP_FILE}} /installer/ # Build-time metadata as defined at http://label-schema.org. ARG BUILD_DATE From afadbf30a448e113592897652a5d159612ed2b9f Mon Sep 17 00:00:00 2001 From: Pavel Zorin Date: Thu, 25 Jan 2024 16:48:25 +0000 Subject: [PATCH 2/2] [CI] Abort image building process if the npcap file non found (#384) --- Makefile.common | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Makefile.common b/Makefile.common index c2246a79..e2a52e49 100644 --- a/Makefile.common +++ b/Makefile.common @@ -17,11 +17,9 @@ endif endif # Requires login at google storage. -copy-npcap: status=".status.copy-npcap" copy-npcap: - @echo '0' > ${status} ifeq ($(CI),true) - @gsutil cp gs://$(GS_BUCKET_PATH)/private/$(NPCAP_FILE) ../npcap/lib/$(NPCAP_FILE) || echo '1' > ${status} + @gsutil cp gs://$(GS_BUCKET_PATH)/private/$(NPCAP_FILE) ../npcap/lib/$(NPCAP_FILE) else @echo 'Only available if running in the CI' endif