Skip to content

Commit

Permalink
Attempt to sign the node exporter darwin build
Browse files Browse the repository at this point in the history
This should hopefully fix the SIGKILL issue on OSX machines.
e.g. in: prometheus#2539

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

Change the docker flags to correct ones

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

Fix errors in running the rcodesign from golang-builder

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

Use pwd instead

Readlink does not work to get the proper path, pwd might do it.
As promu seems to be copying the binaries based on working directory.

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

Try to run at the same job to see if it helps

So far I am unable to find the binary's location with
either pwd or readlink. I'm suspecting that the binary is
not on this specific host that is running the rcodesign.

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

Try to debug what files are in the current working directory

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

Print working directory as well

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

Add quote wrapping

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

Try to debug more

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

Nothing seems to be in .build directory here

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

Remove some of debug commands

Seems like the build does not get produced because of the
CircleCI node index that gets passed into `--parallelism-thread`.
Signed-off-by: Alper Polat <gitperr@gmail.com>

Add a separate sign stage for code signing

Separate stage might be useful so that we have all of
the builds that end up in `.build` here, and sign the one(s)
that we want. First one being implemented here is darwin-arm64.

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

Run only if darwin-arm64 was built

Earlier I tried to add a separate stage for signing,
but seems like that was a bad idea because the pipeline
file has to exist in `master` for that so we can run
the tests properly. Checking with if might be one of the
simpler and better ideas...

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

Add forgotten quote

Fixing basic syntax error

Signed-off-by: Alper Polat <gitperr@gmail.com>
  • Loading branch information
gitperr committed Feb 10, 2024
1 parent e573785 commit 6460701
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ 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
- run: ls -la .build/
# sign the darwin build so it doesn't get SIGKILLed on start, see: https://github.com/prometheus/node_exporter/issues/2539
- run:
command: |
if [ -d "$(pwd)/.build/darwin-arm64" ]; then
docker run --entrypoint "rcodesign" --rm -v "$(pwd)/.build/darwin-arm64/:/build" quay.io/prometheus/golang-builder:1.21-main sign /build/node_exporter
fi
- persist_to_workspace:
root: .
paths:
Expand Down

0 comments on commit 6460701

Please sign in to comment.