From b52e0a4f0c1b82c97f4ad48cab7effdf8827d120 Mon Sep 17 00:00:00 2001 From: idoko Date: Tue, 13 May 2025 05:51:41 +0100 Subject: [PATCH 1/2] set up gssapi in separate build binary --- .goreleaser.yml | 19 +++++++++++++++++++ Makefile | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 04a4e3230..2451884ed 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -2,6 +2,25 @@ dist: build version: 2 builds: - binary: mongodb_exporter + env: + goos: + - linux + - darwin + - windows + goarch: + - amd64 + - arm + - arm64 + goarm: + - 7 + ignore: + - goos: darwin + goarch: arm + flags: + - -v + ldflags: + - -s -w -X main.version=v{{.Version}} -X main.commit={{.ShortCommit}} -X main.buildDate={{.Date}} + - binary: mongodb_exporter.gssapi env: - CGO_ENABLED=1 goos: diff --git a/Makefile b/Makefile index 354d59f8f..ceac7812d 100644 --- a/Makefile +++ b/Makefile @@ -71,7 +71,7 @@ init: ## Install linters cd tools && go generate -x -tags=tools build: ## Compile using plain go build - CGO_ENABLED=1 go build -ldflags="$(GO_BUILD_LDFLAGS)" -o $(PMM_RELEASE_PATH)/mongodb_exporter -tags gssapi + go build -ldflags="$(GO_BUILD_LDFLAGS)" -o $(PMM_RELEASE_PATH)/mongodb_exporter release: ## Build the binaries using goreleaser docker run --rm --privileged \ From 04d6fde4694b41549818d1c128a18f863de8fc51 Mon Sep 17 00:00:00 2001 From: idoko Date: Tue, 13 May 2025 06:18:18 +0100 Subject: [PATCH 2/2] fix cover.out artifact --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index c61083c3d..2ad76b976 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -61,7 +61,7 @@ jobs: - name: Upload coverage results uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # v5.4.2 with: - file: cover.out + files: cover.out flags: agent env_vars: GO_VERSION,TEST_MONGODB_IMAGE fail_ci_if_error: false