File tree 3 files changed +6
-3
lines changed
3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ ARG GOARCH="amd64"
7
7
ARG SHA1="[no-sha]"
8
8
ARG TAG="[no-tag]"
9
9
10
- RUN BUILD_DATE=$(date +%F-%T) CGO_ENABLED=0 GOOS=linux GOARCH=$GOARCH go build -o /redis_exporter \
10
+ RUN BUILD_DATE=$(date +%F-%T) CGO_ENABLED=1 GOEXPERIMENT=boringcrypto GOOS=linux GOARCH=$GOARCH go build -o /redis_exporter \
11
11
-ldflags "-s -w -extldflags \" -static\" -X main.BuildVersion=$TAG -X main.BuildCommitSha=$SHA1 -X main.BuildDate=$BUILD_DATE" .
12
12
13
13
RUN [ $GOARCH = "amd64" ] && /redis_exporter -version || ls -la /redis_exporter
Original file line number Diff line number Diff line change @@ -67,15 +67,16 @@ upload-coverage:
67
67
68
68
69
69
BUILD_DT: =$(shell date +% F-% T)
70
- GO_LDFLAGS: ="-s -w -extldflags \"-static\" -X main.BuildVersion=${DRONE_TAG} -X main.BuildCommitSha=${DRONE_COMMIT_SHA} -X main.BuildDate=$(BUILD_DT ) "
70
+ GO_LDFLAGS: ="-s -w -extldflags \"-static\" -X main.BuildVersion=${DRONE_TAG} -X main.BuildCommitSha=${DRONE_COMMIT_SHA} -X main.BuildDate=$(BUILD_DT ) "
71
71
72
72
.PHONE : build-binaries
73
73
build-binaries :
74
74
go install github.com/oliver006/gox@master
75
75
76
76
rm -rf .build | true
77
77
78
- export CGO_ENABLED=0 ; \
78
+ export CGO_ENABLED=1 ; \
79
+ export GOEXPERIMENT=boringcrypto ; \
79
80
gox -os="linux windows freebsd netbsd openbsd" -arch="amd64 386" -verbose -rebuild -ldflags $(GO_LDFLAGS) -output ".build/redis_exporter-${DRONE_TAG}.{{.OS}}-{{.Arch}}/{{.Dir}}" && \
80
81
gox -os="darwin solaris illumos" -arch="amd64" -verbose -rebuild -ldflags $(GO_LDFLAGS) -output ".build/redis_exporter-${DRONE_TAG}.{{.OS}}-{{.Arch}}/{{.Dir}}" && \
81
82
gox -os="darwin" -arch="arm64" -verbose -rebuild -ldflags $(GO_LDFLAGS) -output ".build/redis_exporter-${DRONE_TAG}.{{.OS}}-{{.Arch}}/{{.Dir}}" && \
Original file line number Diff line number Diff line change 9
9
"strconv"
10
10
"time"
11
11
12
+ _ "crypto/tls/fipsonly"
13
+
12
14
"github.com/prometheus/client_golang/prometheus"
13
15
log "github.com/sirupsen/logrus"
14
16
You can’t perform that action at this time.
0 commit comments