Skip to content
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

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

Merged
merged 10 commits into from
Dec 10, 2024
11 changes: 8 additions & 3 deletions .github/workflows/build_tool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,27 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
image:
image:
- actions-gh-release
- actions-plan-preview
- codegen
- piped-base
- piped-base-okd
- firestore-emulator
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Determine version
run: echo "PIPECD_VERSION=$(git describe --tags --always --abbrev=7)" >> $GITHUB_ENV

- uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0

- uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1

- name: Build ${{ matrix.image }} image
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 #v5.0.0
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0
with:
context: tool/${{ matrix.image }}
tags: ${{ env.REGISTRY }}/pipe-cd/${{ matrix.image }}:${{ env.PIPECD_VERSION }}
platforms: linux/amd64,linux/arm64
2 changes: 1 addition & 1 deletion tool/firestore-emulator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
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


RUN apk add --update --no-cache openjdk11-jre-headless

Expand Down
Loading