-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change build path for linux binaries to match GOARCH. #890
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,16 +9,13 @@ RUN apk --update add ca-certificates | |
|
||
WORKDIR /workspace | ||
|
||
ARG TARGETPLATFORM | ||
RUN echo "Target platform is $TARGETPLATFORM" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should echo the target arch we are running for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wouldn't the TARGETARCH just show up in the COPY instruction when it tries to find the file? |
||
ARG TARGETARCH | ||
|
||
# copy artifacts | ||
# always assume binary is created | ||
COPY build/linux/* /workspace/ | ||
COPY build/linux/$TARGETARCH/aoc /workspace/awscollector | ||
COPY config.yaml /workspace/config/otel-config.yaml | ||
COPY config/ /workspace/config/ | ||
COPY cmd/awscollector/copy_docker_binary.sh /workspace/copy_binary.sh | ||
RUN ./copy_binary.sh | ||
|
||
################################ | ||
# Final Stage # | ||
|
@@ -27,7 +24,7 @@ RUN ./copy_binary.sh | |
FROM scratch | ||
|
||
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt | ||
COPY --from=build /workspace/build/linux/aoc_linux /awscollector | ||
COPY --from=build /workspace/awscollector /awscollector | ||
COPY --from=build /workspace/config/ /etc/ | ||
|
||
ENV RUN_IN_CONTAINER="True" | ||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have we talked with @alolita @anuraaga @Aneurysm9 that being backwards not compatible is okay here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this just an intermediate name used during the build process? Does the name of the executable included in the
deb
,rpm
, or container image change?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is just an intermediate name.
create_rpm.sh
andcreate_deb.sh
both copy the binary in and rename it toaws-otel-collector
. The Dockerfile also renames it, but toawscollector
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah intermediate names should not need to be preserved.
While we're changing these, can we dedupe, and maybe simplify, by moving into the folder
./build/linux-amd64/aoc
?