File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ GO_TEST_CODECOV ?=
99BUILD_DATE ?= $(shell date +% FT% T% z)
1010GOVERSION ?= $(shell go version | cut -d " " -f3)
1111COMPONENT_VERSION ?= $(shell cat VERSION)
12+ IMAGE_TAG ?= $(shell cat VERSION | cut -c 2-)
1213COMPONENT_BRANCH ?= $(shell git describe --always --contains --all)
1314PMM_RELEASE_FULLCOMMIT ?= $(shell git rev-parse HEAD)
1415GO_BUILD_LDFLAGS = -X main.version=${COMPONENT_VERSION} -X main.buildDate=${BUILD_DATE} -X main.commit=${PMM_RELEASE_FULLCOMMIT} -X main.Branch=${COMPONENT_BRANCH} -X main.GoVersion=${GOVERSION} -s -w
@@ -71,7 +72,10 @@ init: ## Install linters
7172 cd tools && go generate -x -tags=tools
7273
7374build : # # Build exporter binary using plain go build.
74- go build -ldflags=" $( GO_BUILD_LDFLAGS) " -o $(PMM_RELEASE_PATH ) /mongodb_exporter
75+ CGO_ENABLED=0 go build -ldflags=" $( GO_BUILD_LDFLAGS) " -o $(PMM_RELEASE_PATH ) /mongodb_exporter
76+
77+ docker-build : build
78+ docker build -t ${NAME} :${IMAGE_TAG} .
7579
7680build-gssapi : # # Build exporter binary with GSSAPI support (requires CGO enabled).
7781 CGO_ENABLED=1 go build -ldflags=" $( GO_BUILD_LDFLAGS) " -tags gssapi -o $(PMM_RELEASE_PATH ) /mongodb_exporter
You can’t perform that action at this time.
0 commit comments