Skip to content

added arm64 build for piped-base and other images#5395

Merged
t-kikuc merged 10 commits intopipe-cd:masterfrom
ponkio-o:added-arm64
Dec 10, 2024
Merged

added arm64 build for piped-base and other images#5395
t-kikuc merged 10 commits intopipe-cd:masterfrom
ponkio-o:added-arm64

Conversation

@ponkio-o
Copy link
Contributor

@ponkio-o ponkio-o commented Dec 6, 2024

What this PR does: added linux/arm64 build for tool images

Why we need it: I'm currently working on arm64 support. First, I added an arm64 build to the container image under the tool where piped-base and others are stored.

Which issue(s) this PR fixes:

related: #4896

Does this PR introduce a user-facing change?: no

  • How are users affected by this change: no
  • Is this breaking change: no

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>
…f google/clodu-sdk

Signed-off-by: ponkio-o <29038315+ponkio-o@users.noreply.github.com>
ARG GOOGLE_CLOUD_SDK_VERSION=392.0.0-alpine

FROM google/cloud-sdk:$GOOGLE_CLOUD_SDK_VERSION
FROM gcr.io/google.com/cloudsdktool/google-cloud-cli:$GOOGLE_CLOUD_SDK_VERSION
Copy link
Contributor Author

@ponkio-o ponkio-o Dec 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Container image was changed. Because google/cloud-sdk doesn't support arm64.
https://cloud.google.com/sdk/docs/downloads-docker

$ uname -m
arm64

$ docker inspect google/cloud-sdk:392.0.0-alpine | jq -r .[].Architecture
amd64

$ docker inspect gcr.io/google.com/cloudsdktool/google-cloud-cli:392.0.0-alpine | jq .[].Architecture
arm64

And I checked working correctly when use it.

$ docker build -t firestore-emulator:local-test .

$ git diff
diff --git a/test/integration/datastore/firestore/main_test.go b/test/integration/datastore/firestore/main_test.go
index 3978f304..b7ed6acb 100644
--- a/test/integration/datastore/firestore/main_test.go
+++ b/test/integration/datastore/firestore/main_test.go
@@ -30,8 +30,8 @@ import (
 const (
        env        = "FIRESTORE_EMULATOR_HOST"
        port       = "8080"
-       repository = "ghcr.io/pipe-cd/firestore-emulator"
-       tag        = "v0.34.0-3-gf22c209"
+       repository = "firestore-emulator"
+       tag        = "local-test"
        project    = "pipecd-test"
 )

$ go test . -v
=== RUN   TestGet
=== RUN   TestGet/entity_found
=== RUN   TestGet/not_found
--- PASS: TestGet (1.80s)
    --- PASS: TestGet/entity_found (0.00s)
    --- PASS: TestGet/not_found (0.00s)
=== RUN   TestFind
=== RUN   TestFind/fetch_all
=== RUN   TestFind/fetch_by_name
=== RUN   TestFind/only_cursor_given
--- PASS: TestFind (0.04s)
    --- PASS: TestFind/fetch_all (0.02s)
    --- PASS: TestFind/fetch_by_name (0.01s)
    --- PASS: TestFind/only_cursor_given (0.00s)
=== RUN   TestCreate
=== RUN   TestCreate/already_exists
=== RUN   TestCreate/successful_create
--- PASS: TestCreate (0.02s)
    --- PASS: TestCreate/already_exists (0.01s)
    --- PASS: TestCreate/successful_create (0.01s)
=== RUN   TestUpdate
=== RUN   TestUpdate/not_found
=== RUN   TestUpdate/unable_to_update
=== RUN   TestUpdate/successful_update
--- PASS: TestUpdate (0.03s)
    --- PASS: TestUpdate/not_found (0.01s)
    --- PASS: TestUpdate/unable_to_update (0.01s)
    --- PASS: TestUpdate/successful_update (0.01s)
PASS
ok      github.com/pipe-cd/pipecd/test/integration/datastore/firestore  3.651s

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't use latest version? If I can't use this version, I'll revert version of actions/checkout and docker/build-push-acion.
CleanShot 2024-12-09 at 10 11 09
https://github.com/pipe-cd/pipecd/actions/runs/12198639429

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution!
I added them to the allowlist.

@Warashi
Copy link
Member

Warashi commented Dec 9, 2024

@ponkio-o
Thank you for your contribution!

I updated the branch to run the build_tool workflow.
The workflow ran and raised errors. Could you please check them?

https://github.com/pipe-cd/pipecd/actions/runs/12228733737

Signed-off-by: ponkio-o <29038315+ponkio-o@users.noreply.github.com>
@ponkio-o
Copy link
Contributor Author

ponkio-o commented Dec 9, 2024

@Warashi I fixed the following commit that to use QEMU and buildx for docker build.
fb716ca

And, can you add the following actions to white list of actions?

  • docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf
  • docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349

Copy link
Member

@Warashi Warashi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added them to the allowlist and ran the build_tool workflow.
The workflow succeeded! Thank you!
https://github.com/pipe-cd/pipecd/actions/runs/12246423657?pr=5395

Copy link
Member

@t-kikuc t-kikuc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!!

@t-kikuc t-kikuc enabled auto-merge (squash) December 10, 2024 00:51
@t-kikuc t-kikuc merged commit 4e74757 into pipe-cd:master Dec 10, 2024
@ponkio-o ponkio-o deleted the added-arm64 branch December 10, 2024 01:23
@ponkio-o ponkio-o mentioned this pull request Dec 10, 2024
@github-actions github-actions bot mentioned this pull request Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants