Skip to content

Commit 17fb3da

Browse files
authored
Merge branch 'main' into multi-target-support
2 parents 4e311c4 + 55813e2 commit 17fb3da

File tree

11 files changed

+332
-77
lines changed

11 files changed

+332
-77
lines changed

.github/workflows/build.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- release-0.1x
8+
tags:
9+
- v[0-9]+.[0-9]+.[0-9]+*
10+
pull_request:
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
build:
17+
name: Build
18+
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
24+
with:
25+
fetch-depth: 0
26+
27+
- name: Set up Go
28+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
29+
with:
30+
go-version-file: ${{ github.workspace }}/go.mod
31+
32+
- name: Set up QEMU
33+
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
34+
35+
- name: Set up Docker Buildx
36+
id: buildx
37+
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
38+
39+
- name: Dry-run GoReleaser
40+
run: |
41+
make release-dry-run
42+
43+
- name: Run debug commands on failure
44+
if: ${{ failure() }}
45+
run: |
46+
echo "--- Environment variables ---"
47+
env | sort
48+
echo "--- GO Environment ---"
49+
go env | sort
50+
echo "--- Git status ---"
51+
git status
52+
echo "--- Docker logs ---"
53+
docker compose logs
54+
echo "--- Docker ps ---"
55+
docker compose ps -a

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020

2121
steps:
2222
- name: Checkout code
23-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
23+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2424

2525
- name: Set up Go
2626
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
runs-on: ubuntu-latest
2222
steps:
2323
- name: Checkout
24-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
24+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2525
with:
2626
fetch-depth: 0
2727

@@ -31,13 +31,13 @@ jobs:
3131
go-version-file: ${{ github.workspace }}/go.mod
3232

3333
- name: Login to Docker Hub
34-
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
34+
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
3535
with:
3636
username: ${{ secrets.DOCKERHUB_USERNAME }}
3737
password: ${{ secrets.DOCKERHUB_TOKEN }}
3838

3939
- name: Login to GitHub Container Registry
40-
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
40+
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
4141
with:
4242
registry: ghcr.io
4343
username: ${{ github.actor }}

.github/workflows/scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
steps:
2525
- name: Checkout code
26-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
26+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2727
with:
2828
persist-credentials: false
2929

.github/workflows/go.yml renamed to .github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
steps:
4040
- name: Checkout code
41-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
41+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
4242

4343
- name: Set up Go
4444
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0

.github/workflows/version-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
steps:
1414
- name: Checkout code
15-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
15+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
1616
with:
1717
fetch-depth: 0
1818

.goreleaser.yml

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ builds:
44
- binary: mongodb_exporter
55
id: mongodb_exporter
66
env:
7+
- CGO_ENABLED=0
78
goos:
89
- linux
910
- darwin
10-
- windows
1111
goarch:
1212
- amd64
1313
- arm
@@ -21,28 +21,6 @@ builds:
2121
- -v
2222
ldflags:
2323
- -s -w -X main.version=v{{.Version}} -X main.commit={{.ShortCommit}} -X main.buildDate={{.Date}}
24-
- binary: mongodb_exporter-gssapi
25-
id: mongodb_exporter-gssapi
26-
env:
27-
- CGO_ENABLED=1
28-
goos:
29-
- linux
30-
- darwin
31-
- windows
32-
goarch:
33-
- amd64
34-
- arm
35-
- arm64
36-
goarm:
37-
- 7
38-
ignore:
39-
- goos: darwin
40-
goarch: arm
41-
flags:
42-
- -v
43-
- -tags=gssapi
44-
ldflags:
45-
- -s -w -X main.version=v{{.Version}} -X main.commit={{.ShortCommit}} -X main.buildDate={{.Date}}
4624
archives:
4725
- name_template: "{{ .ProjectName }}-{{ .Version }}.{{ .Os }}-{{ .Arch }}"
4826
wrap_in_directory: true

Makefile

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: all build clean default help init test format check-license
1+
.PHONY: all build clean default help init test format check-license release-dry-run
22
default: help
33

44
GO_TEST_PATH ?= ./...
@@ -83,6 +83,21 @@ release: ## Build the binaries using goreleaser
8383
-w /go/src/github.com/user/repo \
8484
goreleaser/goreleaser release --snapshot --skip=publish --clean
8585

86+
release-dry-run: ## Build cross-platform binaries locally without publishing
87+
@echo "Building cross-platform binaries with GoReleaser..."
88+
@if command -v goreleaser >/dev/null 2>&1; then \
89+
goreleaser build --snapshot --clean; \
90+
else \
91+
echo "GoReleaser not found. Installing via Docker..."; \
92+
docker run --rm --privileged \
93+
-v ${PWD}:/go/src/github.com/percona/mongodb_exporter \
94+
-v /var/run/docker.sock:/var/run/docker.sock \
95+
-w /go/src/github.com/percona/mongodb_exporter \
96+
goreleaser/goreleaser build --snapshot --clean; \
97+
fi
98+
@find build -name mongodb_exporter -type f | sort
99+
100+
86101
FILES = $(shell find . -type f -name '*.go' -not -path "./vendor/*")
87102

88103
format: ## Format source code

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.46.0
1+
v0.47.0

go.mod

Lines changed: 78 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,54 +19,120 @@ require (
1919

2020
require github.com/foxcpp/go-mockdns v1.1.0
2121

22-
require github.com/hashicorp/go-version v1.7.0
23-
24-
require github.com/percona/percona-backup-mongodb v1.8.1-0.20250218045950-7e9f38fe06ab
22+
require (
23+
github.com/hashicorp/go-version v1.7.0
24+
github.com/percona/percona-backup-mongodb v1.8.1-0.20250429102026-063dab6cc946
25+
)
2526

2627
require (
28+
cel.dev/expr v0.23.0 // indirect
29+
cloud.google.com/go v0.120.0 // indirect
30+
cloud.google.com/go/auth v0.16.2 // indirect
31+
cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect
32+
cloud.google.com/go/compute/metadata v0.7.0 // indirect
33+
cloud.google.com/go/iam v1.5.2 // indirect
34+
cloud.google.com/go/monitoring v1.24.2 // indirect
35+
cloud.google.com/go/storage v1.50.0 // indirect
2736
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.10.0 // indirect
2837
github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 // indirect
2938
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.1 // indirect
30-
github.com/aws/aws-sdk-go v1.55.5 // indirect
39+
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.27.0 // indirect
40+
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.50.0 // indirect
41+
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.50.0 // indirect
42+
github.com/aws/aws-sdk-go-v2 v1.33.0 // indirect
43+
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.7 // indirect
44+
github.com/aws/aws-sdk-go-v2/config v1.29.0 // indirect
45+
github.com/aws/aws-sdk-go-v2/credentials v1.17.53 // indirect
46+
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.24 // indirect
47+
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.50 // indirect
48+
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.28 // indirect
49+
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.28 // indirect
50+
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect
51+
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.28 // indirect
52+
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 // indirect
53+
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.5.0 // indirect
54+
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.9 // indirect
55+
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.9 // indirect
56+
github.com/aws/aws-sdk-go-v2/service/s3 v1.73.0 // indirect
57+
github.com/aws/aws-sdk-go-v2/service/sso v1.24.10 // indirect
58+
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.9 // indirect
59+
github.com/aws/aws-sdk-go-v2/service/sts v1.33.8 // indirect
60+
github.com/aws/smithy-go v1.22.1 // indirect
3161
github.com/beorn7/perks v1.0.1 // indirect
3262
github.com/cespare/xxhash/v2 v2.3.0 // indirect
63+
github.com/cncf/xds/go v0.0.0-20250326154945-ae57f3c0d45f // indirect
3364
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
3465
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
66+
github.com/dustin/go-humanize v1.0.1 // indirect
67+
github.com/envoyproxy/go-control-plane/envoy v1.32.4 // indirect
68+
github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect
69+
github.com/felixge/httpsnoop v1.0.4 // indirect
3570
github.com/frankban/quicktest v1.14.6 // indirect
71+
github.com/go-jose/go-jose/v4 v4.0.5 // indirect
72+
github.com/go-logr/logr v1.4.2 // indirect
73+
github.com/go-logr/stdr v1.2.2 // indirect
3674
github.com/golang/snappy v0.0.4 // indirect
75+
github.com/google/s2a-go v0.1.9 // indirect
3776
github.com/google/uuid v1.6.0 // indirect
77+
github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect
78+
github.com/googleapis/gax-go/v2 v2.14.2 // indirect
3879
github.com/jessevdk/go-flags v1.5.0 // indirect
39-
github.com/jmespath/go-jmespath v0.4.0 // indirect
4080
github.com/jpillora/backoff v1.0.0 // indirect
81+
github.com/json-iterator/go v1.1.12 // indirect
4182
github.com/klauspost/compress v1.18.0 // indirect
83+
github.com/klauspost/cpuid/v2 v2.2.6 // indirect
4284
github.com/klauspost/pgzip v1.2.6 // indirect
4385
github.com/kylelemons/godebug v1.1.0 // indirect
4486
github.com/mdlayher/socket v0.4.1 // indirect
4587
github.com/mdlayher/vsock v1.2.1 // indirect
4688
github.com/miekg/dns v1.1.57 // indirect
89+
github.com/minio/md5-simd v1.1.2 // indirect
90+
github.com/minio/minio-go/v7 v7.0.68 // indirect
91+
github.com/minio/sha256-simd v1.0.1 // indirect
92+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
93+
github.com/modern-go/reflect2 v1.0.2 // indirect
4794
github.com/mongodb/mongo-tools v0.0.0-20240723193119-837c2bc263f4 // indirect
4895
github.com/montanaflynn/stats v0.7.1 // indirect
4996
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
5097
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
5198
github.com/pierrec/lz4 v2.6.1+incompatible // indirect
99+
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
52100
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
53101
github.com/prometheus/procfs v0.16.1 // indirect
54-
github.com/rogpeppe/go-internal v1.11.0 // indirect
102+
github.com/rs/xid v1.5.0 // indirect
103+
github.com/spiffe/go-spiffe/v2 v2.5.0 // indirect
55104
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
56105
github.com/xdg-go/scram v1.1.2 // indirect
57106
github.com/xdg-go/stringprep v1.0.4 // indirect
58107
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect
59-
golang.org/x/crypto v0.38.0 // indirect
108+
github.com/zeebo/errs v1.4.0 // indirect
109+
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
110+
go.opentelemetry.io/contrib/detectors/gcp v1.35.0 // indirect
111+
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 // indirect
112+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect
113+
go.opentelemetry.io/otel v1.36.0 // indirect
114+
go.opentelemetry.io/otel/metric v1.36.0 // indirect
115+
go.opentelemetry.io/otel/sdk v1.36.0 // indirect
116+
go.opentelemetry.io/otel/sdk/metric v1.36.0 // indirect
117+
go.opentelemetry.io/otel/trace v1.36.0 // indirect
118+
golang.org/x/crypto v0.39.0 // indirect
60119
golang.org/x/exp v0.0.0-20240529005216-23cca8864a10 // indirect
61-
golang.org/x/mod v0.19.0 // indirect
62-
golang.org/x/net v0.40.0 // indirect
120+
golang.org/x/mod v0.25.0 // indirect
121+
golang.org/x/net v0.41.0 // indirect
63122
golang.org/x/oauth2 v0.30.0 // indirect
64-
golang.org/x/sync v0.14.0 // indirect
123+
golang.org/x/sync v0.15.0 // indirect
65124
golang.org/x/sys v0.33.0 // indirect
66125
golang.org/x/term v0.32.0 // indirect
67-
golang.org/x/text v0.25.0 // indirect
68-
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
126+
golang.org/x/text v0.26.0 // indirect
127+
golang.org/x/time v0.12.0 // indirect
128+
golang.org/x/tools v0.33.0 // indirect
129+
google.golang.org/api v0.240.0 // indirect
130+
google.golang.org/genproto v0.0.0-20250505200425-f936aa4a68b2 // indirect
131+
google.golang.org/genproto/googleapis/api v0.0.0-20250505200425-f936aa4a68b2 // indirect
132+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 // indirect
133+
google.golang.org/grpc v1.73.0 // indirect
69134
google.golang.org/protobuf v1.36.6 // indirect
135+
gopkg.in/ini.v1 v1.67.0 // indirect
70136
gopkg.in/yaml.v2 v2.4.0 // indirect
71137
gopkg.in/yaml.v3 v3.0.1 // indirect
72138
)

0 commit comments

Comments
 (0)