Skip to content

Commit 6e9fe17

Browse files
gitperrSuperQ
andcommitted
Sign node exporter darwin binary with rcodesign (#3008)
* Sign node exporter darwin binary with rcodesign Prevents SIGKILL issues on macs Signed-off-by: Alper Polat <[email protected]> * Be explicit about checking for the binary Co-authored-by: Ben Kochie <[email protected]> Signed-off-by: Alper Polat <[email protected]> * Also attempt to sign darwin-amd64 Signed-off-by: Alper Polat <[email protected]> --------- Signed-off-by: Alper Polat <[email protected]> Signed-off-by: Alper Polat <[email protected]> Co-authored-by: Ben Kochie <[email protected]>
1 parent 29f4cae commit 6e9fe17

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.circleci/config.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,16 @@ jobs:
4949
- run: docker run --privileged linuxkit/binfmt:af88a591f9cc896a52ce596b9cf7ca26a061ef97
5050
- run: promu crossbuild -v --parallelism $CIRCLE_NODE_TOTAL --parallelism-thread $CIRCLE_NODE_INDEX
5151
- run: promu --config .promu-cgo.yml crossbuild -v --parallelism $CIRCLE_NODE_TOTAL --parallelism-thread $CIRCLE_NODE_INDEX
52+
# sign the darwin build so it doesn't get SIGKILLed on start, see: https://github.com/prometheus/node_exporter/issues/2539
53+
- run:
54+
command: |
55+
if [[ -f "$(pwd)/.build/darwin-arm64/node_exporter" ]]; then
56+
promu codesign "$(pwd)/.build/darwin-arm64/node_exporter"
57+
fi
58+
59+
if [[ -f "$(pwd)/.build/darwin-amd64/node_exporter" ]]; then
60+
promu codesign "$(pwd)/.build/darwin-amd64/node_exporter"
61+
fi
5262
- persist_to_workspace:
5363
root: .
5464
paths:

0 commit comments

Comments
 (0)