Skip to content

Commit

Permalink
Sign node exporter darwin binary with rcodesign (#3008)
Browse files Browse the repository at this point in the history
* Sign node exporter darwin binary with rcodesign

Prevents SIGKILL issues on macs

Signed-off-by: Alper Polat <gitperr@gmail.com>

* Be explicit about checking for the binary

Co-authored-by: Ben Kochie <superq@gmail.com>
Signed-off-by: Alper Polat <101826653+gitperr@users.noreply.github.com>

* Also attempt to sign darwin-amd64

Signed-off-by: Alper Polat <gitperr@gmail.com>

---------

Signed-off-by: Alper Polat <gitperr@gmail.com>
Signed-off-by: Alper Polat <101826653+gitperr@users.noreply.github.com>
Co-authored-by: Ben Kochie <superq@gmail.com>
  • Loading branch information
gitperr and SuperQ committed May 21, 2024
1 parent 29f4cae commit 6e9fe17
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@ jobs:
- run: docker run --privileged linuxkit/binfmt:af88a591f9cc896a52ce596b9cf7ca26a061ef97
- run: promu crossbuild -v --parallelism $CIRCLE_NODE_TOTAL --parallelism-thread $CIRCLE_NODE_INDEX
- run: promu --config .promu-cgo.yml crossbuild -v --parallelism $CIRCLE_NODE_TOTAL --parallelism-thread $CIRCLE_NODE_INDEX
# sign the darwin build so it doesn't get SIGKILLed on start, see: https://github.com/prometheus/node_exporter/issues/2539
- run:
command: |
if [[ -f "$(pwd)/.build/darwin-arm64/node_exporter" ]]; then
promu codesign "$(pwd)/.build/darwin-arm64/node_exporter"
fi
if [[ -f "$(pwd)/.build/darwin-amd64/node_exporter" ]]; then
promu codesign "$(pwd)/.build/darwin-amd64/node_exporter"
fi
- persist_to_workspace:
root: .
paths:
Expand Down

0 comments on commit 6e9fe17

Please sign in to comment.