-
Notifications
You must be signed in to change notification settings - Fork 155
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
feat: added arm64 build #5420
feat: added arm64 build #5420
Conversation
Signed-off-by: ponkio-o <29038315+ponkio-o@users.noreply.github.com>
Signed-off-by: ponkio-o <29038315+ponkio-o@users.noreply.github.com>
Signed-off-by: ponkio-o <29038315+ponkio-o@users.noreply.github.com>
Signed-off-by: ponkio-o <29038315+ponkio-o@users.noreply.github.com>
37ca665
to
a615517
Compare
Signed-off-by: ponkio-o <29038315+ponkio-o@users.noreply.github.com>
Signed-off-by: ponkio-o <29038315+ponkio-o@users.noreply.github.com>
cmd/helloworld/Dockerfile
Outdated
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.
Currently, binaries built for linux/amd64 on CI are added to the image, but I have changed to build them inside the Dockerfile. This will automatically configure GOARCH and other settings.
As noted in the Issue, the linux/arm64 docker image exists, but the binary that exits in the image is linux/amd64, which is the cause of the current error.
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 👍🏻
cmd/pipecd/Dockerfile
Outdated
# web builder | ||
FROM node:20.18.1-alpine3.21 AS web | ||
|
||
WORKDIR /app | ||
|
||
COPY . . | ||
|
||
RUN apk add --no-cache make | ||
RUN make update/web-deps | ||
RUN make build/web | ||
|
||
# pipecd builder | ||
FROM golang:1.23.3 AS builder | ||
|
||
WORKDIR /app | ||
|
||
COPY go.* ./ | ||
RUN go mod download | ||
|
||
COPY . ./ | ||
|
||
RUN make build/go MOD=pipecd | ||
|
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.
Sorry, we use git
in our Makefile in many places, so please install git in web and go builder?
Line 21 in d5ba3d2
build/go: BUILD_VERSION ?= $(shell git describe --tags --always --dirty --abbrev=7) |
Line 8 in d5ba3d2
"build": "PIPECD_VERSION=`git describe --tags --always --dirty --abbrev=7` webpack build --mode production --env htmlTemplate=./base.html --config ./webpack.config.js", |
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.
@Warashi Thank you for your review. I installed git
command to builder container on below commit.
beb90e7
And golang:1.23.3
has been installed git
already.
$ docker run --rm -it golang:1.23.3 git --help
usage: git [-v | --version] [-h | --help] [-C <path>] [-c <name>=<value>]
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
[--super-prefix=<path>] [--config-env=<name>=<envvar>]
<command> [<args>]
These are common Git commands used in various situations:
start a working area (see also: git help tutorial)
clone Clone a repository into a new directory
init Create an empty Git repository or reinitialize an existing one
work on the current change (see also: git help everyday)
add Add file contents to the index
mv Move or rename a file, a directory, or a symlink
restore Restore working tree files
rm Remove files from the working tree and from the index
examine the history and state (see also: git help revisions)
bisect Use binary search to find the commit that introduced a bug
diff Show changes between commits, commit and working tree, etc
grep Print lines matching a pattern
log Show commit logs
show Show various types of objects
status Show the working tree status
grow, mark and tweak your common history
branch List, create, or delete branches
commit Record changes to the repository
merge Join two or more development histories together
rebase Reapply commits on top of another base tip
reset Reset current HEAD to the specified state
switch Switch branches
tag Create, list, delete or verify a tag object signed with GPG
collaborate (see also: git help workflows)
fetch Download objects and refs from another repository
pull Fetch from and integrate with another repository or a local branch
push Update remote refs along with associated objects
'git help -a' and 'git help -g' list available subcommands and some
concept guides. See 'git help <command>' or 'git help <concept>'
to read about a specific subcommand or concept.
See 'git help git' for an overview of the system.
I mistakenly approved without checking the behavior.
@ponkio-o |
Signed-off-by: ponkio-o <29038315+ponkio-o@users.noreply.github.com>
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.
Thank you! LGTM 👍🏻
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
cache: true | ||
- name: Determine version |
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.
[ASK] Is this line still needed?
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.
@ponkio-o
Sorry for the wrong selection.
I'm asking about only this line.
- name: Determine version
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.
Sorry, the below line is needed.
run: echo "PIPECD_VERSION=$(git describe --tags --always --abbrev=7)" >> $GITHUB_ENV
Fixed in the following commit.
1fb5523
Signed-off-by: ponkio-o <29038315+ponkio-o@users.noreply.github.com>
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.
Thank you so much!!!!!
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.
Thank you!
What this PR does: Added linux/arm64 build to all docker images.
Why we need it: To support linux/arm64
Which issue(s) this PR fixes:
Fixes #4896
Does this PR introduce a user-facing change?: No