Skip to content

Commit

Permalink
directly generate cws_instrumentatio binary with the expected name
Browse files Browse the repository at this point in the history
  • Loading branch information
chouquette committed Feb 5, 2025
1 parent 062c3ca commit ec8a0c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .gitlab/binary_build/cws_instrumentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
needs: ["go_mod_tidy_check"]
script:
- inv check-go-version
- inv -e cws-instrumentation.build
- mv $CI_PROJECT_DIR/$CWS_INSTRUMENTATION_BINARIES_DIR/cws-instrumentation $CI_PROJECT_DIR/$CWS_INSTRUMENTATION_BINARIES_DIR/cws-instrumentation.$ARCH
- inv -e cws-instrumentation.build --arch-suffix
artifacts:
paths:
- $CWS_INSTRUMENTATION_BINARIES_DIR/cws-instrumentation.$ARCH
Expand Down
4 changes: 4 additions & 0 deletions tasks/cws_instrumentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def build(
static=False,
fips_mode=False,
no_strip_binary=False,
arch_suffix=False,
):
"""
Build cws-instrumentation
Expand All @@ -60,6 +61,9 @@ def build(
build_type = "-a" if rebuild else ""
go_build_tags = " ".join(build_tags)
agent_bin = BIN_PATH
if arch_suffix:
arch = CONTAINER_PLATFORM_MAPPING.get(platform.machine().lower())
agent_bin = f'{agent_bin}.{arch}'

strip_flags = "" if no_strip_binary else "-s -w"

Expand Down

0 comments on commit ec8a0c4

Please sign in to comment.