-
Notifications
You must be signed in to change notification settings - Fork 30
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
Jenkins 2 GH Actions Workflow Migration #362
Jenkins 2 GH Actions Workflow Migration #362
Conversation
eaaa424
to
0f6ea0f
Compare
ce148de
to
39f069b
Compare
4c96618
to
fc84cb2
Compare
💔 Build Failed
Expand to view the summary
Build stats
Steps errors
Expand to view the steps failures
|
@elastic/observablt-ci there seems to be a status context naming collision.
are reporting the same status check. |
@@ -0,0 +1,81 @@ | |||
project_name: apm-lambda-extension |
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.
Migrated to GoReleaser because we don't have ARM runners available in GH Actions workflows by default.
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.
Great work!! A few comments
As pointed in the below comment: #362 (comment)
Dockerfile
Outdated
@@ -3,6 +3,10 @@ | |||
# https://github.com/docker-library/repo-info/tree/master/repos/alpine/remote | |||
FROM alpine@sha256:bc41182d7ef5ffc53a40b044e725193bc10142a1243f395ee852a8d9730fc2ad | |||
ARG EXTENSION_FILE | |||
ARG BUILD_DATE |
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.
issue: I don't think this is right. The dockerfile is only copying the build artifacts to the docker image. There should be no need to change the file time inside the docker image as the build artifacts should have already been built reproducibly.
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.
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.
I tried running the command and got the following:
release failed after 1s error=docker build failed: failed to build docker.elastic.co/observability/apm-lambda-extension-arm64:1.2.0: exit status 125: unknown flag: --builder
it seems goreleaser is using docker-buildx
under the hood. Installing docker-buildx
fixed the issues. (should be documented, opened a followup issue: #372)
building the docker image is failing but I think that's related to a typo. I've left a comment below.
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.
Ok, I see some progress but the build is still failing:
#8 [4/4] RUN find /opt -exec touch -amdt "1675338235" {} ;
#8 0.240 exec /bin/sh: exec format error
#8 ERROR: executor failed running [/bin/sh -c find /opt -exec touch -amdt "${COMMIT_TIMESTAMP}" {} \;]: exit code: 1
------
> [4/4] RUN find /opt -exec touch -amdt "1675338235" {} ;:
#8 0.240 exec /bin/sh: exec format error
------
ERROR: failed to solve: executor failed running [/bin/sh -c find /opt -exec touch -amdt "${COMMIT_TIMESTAMP}" {} \;]: exit code: 1
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.
@reakaleek I think this is the last issue. Is the docker build working for you ?
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.
Interesting. Yes, it works for me. (Apple macOS M1)
And this workflow shows that it should work with Ubuntu on amd64.
Looking at your error message, if I recall correctly, this could be a buildx setup issue.
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.
I was able to reproduce the issue by building the arm64 image.
docker buildx build --platform linux/arm64 .
I'm on linux (amd64). I'll investigate more
4a72e87
to
c9ad1d7
Compare
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.
Just a minor comment
Co-authored-by: kruskall <[email protected]>
Co-authored-by: kruskall <[email protected]>
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.
LGTM!
Details
While migrating to GH Actions I had to utilise GoReleaser in conjunction with buildx to be able to build ARM compatible artifacts.
How to test
I ran following steps locally:
Run without pushing or publishing to AWS:
Test aws publish script:
Test the GitHub release:
export VERSION=v0.0.9999 ./.ci/release-github.sh
Related Issues