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 ?=
9
9
BUILD_DATE ?= $(shell date +% FT% T% z)
10
10
GOVERSION ?= $(shell go version | cut -d " " -f3)
11
11
COMPONENT_VERSION ?= $(shell cat VERSION)
12
+ IMAGE_TAG ?= $(shell cat VERSION | cut -c 2-)
12
13
COMPONENT_BRANCH ?= $(shell git describe --always --contains --all)
13
14
PMM_RELEASE_FULLCOMMIT ?= $(shell git rev-parse HEAD)
14
15
GO_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
71
72
cd tools && go generate -x -tags=tools
72
73
73
74
build : # # 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} .
75
79
76
80
build-gssapi : # # Build exporter binary with GSSAPI support (requires CGO enabled).
77
81
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