craigcondit commented on code in PR #803:
URL: https://github.com/apache/yunikorn-k8shim/pull/803#discussion_r1525601169


##########
Makefile:
##########
@@ -408,6 +430,17 @@ plugin: $(RELEASE_BIN_DIR)/$(PLUGIN_BINARY)
 $(RELEASE_BIN_DIR)/$(PLUGIN_BINARY): go.mod go.sum $(shell find pkg)
        @echo "building binary for plugin docker image"
        @mkdir -p "$(RELEASE_BIN_DIR)"
+ifeq ($(REPRO),1)
+       docker run -t --rm=true --volume "$(BASE_DIR):/buildroot" 
"golang:$(GO_REPRO_VERSION)" sh -c "cd /buildroot && \
+       CGO_ENABLED=0 GOOS=linux GOARCH=\"${EXEC_ARCH}\" go build \
+       -a \
+       -o=${RELEASE_BIN_DIR}/${PLUGIN_BINARY} \
+       -trimpath \
+       -ldflags '-buildid= -extldflags \"-static\" -X 
${FLAG_PREFIX}.buildVersion=${VERSION} -X ${FLAG_PREFIX}.buildDate=${DATE} -X 
${FLAG_PREFIX}.isPluginVersion=true -X 
${FLAG_PREFIX}.goVersion=${GO_REPRO_VERSION} -X 
${FLAG_PREFIX}.arch=${EXEC_ARCH} -X ${FLAG_PREFIX}.coreSHA=${CORE_SHA} -X 
${FLAG_PREFIX}.siSHA=${SI_SHA} -X ${FLAG_PREFIX}.shimSHA=${SHIM_SHA}' \
+       -tags netgo \
+       -installsuffix netgo \
+       ./pkg/cmd/schedulerplugin/"
+else

Review Comment:
   That was my thought. Downloading all the deps and not caching build 
artifacts is a little excessive for day-to-day dev work. So I think keeping 
both is the best plan. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to