From dceb4bede11945343df88d3b1dc399c62fa6ac75 Mon Sep 17 00:00:00 2001 From: Aditya Bhatia <7274741+adityabhatia@users.noreply.github.com> Date: Thu, 31 Aug 2023 19:38:58 +0200 Subject: [PATCH 1/2] LDFLAGS defined once for Makefile --- Makefile | 2 +- hack/e2e.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 516b859531..5478f58d37 100644 --- a/Makefile +++ b/Makefile @@ -199,7 +199,7 @@ ifeq ($(SELINUX_ENABLED),1) endif # Set build time variables including version details -LDFLAGS := $(shell hack/version.sh) +LDFLAGS ?= $(shell hack/version.sh) # Additional CAPV vars (everything else is ~ kept in sync with core CAPI) # Allow overriding manifest generation destination directory diff --git a/hack/e2e.sh b/hack/e2e.sh index 83609f2d0d..3addb714ca 100755 --- a/hack/e2e.sh +++ b/hack/e2e.sh @@ -119,6 +119,7 @@ export WORKLOAD_CONTROL_PLANE_ENDPOINT_IP echo "Acquired Workload Cluster Control Plane IP: $WORKLOAD_CONTROL_PLANE_ENDPOINT_IP" # save the docker image locally +export LDFLAGS="" make e2e-image mkdir -p "$ARTIFACTS"/tempContainers docker save gcr.io/k8s-staging-cluster-api/capv-manager:e2e -o "$DOCKER_IMAGE_TAR" From 57c366c80fd1b227a6478fef1a3a8aeb8040be87 Mon Sep 17 00:00:00 2001 From: Aditya Bhatia <7274741+adityabhatia@users.noreply.github.com> Date: Mon, 4 Sep 2023 17:08:24 +0200 Subject: [PATCH 2/2] add LDFLAGS comment to e2e docs --- hack/e2e.sh | 1 - test/e2e/README.md | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hack/e2e.sh b/hack/e2e.sh index 3addb714ca..83609f2d0d 100755 --- a/hack/e2e.sh +++ b/hack/e2e.sh @@ -119,7 +119,6 @@ export WORKLOAD_CONTROL_PLANE_ENDPOINT_IP echo "Acquired Workload Cluster Control Plane IP: $WORKLOAD_CONTROL_PLANE_ENDPOINT_IP" # save the docker image locally -export LDFLAGS="" make e2e-image mkdir -p "$ARTIFACTS"/tempContainers docker save gcr.io/k8s-staging-cluster-api/capv-manager:e2e -o "$DOCKER_IMAGE_TAR" diff --git a/test/e2e/README.md b/test/e2e/README.md index a5c3a3225b..3fe3b54b87 100644 --- a/test/e2e/README.md +++ b/test/e2e/README.md @@ -50,6 +50,9 @@ The first step to running the e2e tests is setting up the required environment v Run the following command to execute the CAPV e2e tests: ```shell +# For local testing, uncomment the line below to turn off traceability in the built image. +# export LDFLAGS="" + make e2e ```