gtfs-validator icon indicating copy to clipboard operation
gtfs-validator copied to clipboard

chore: build & publish multi-platform image(linux/arm64, linux/adm64) Docker images

Open davidgamez opened this issue 1 year ago • 3 comments

Summary:

Alternative solution for #1367. This PR addresses the issue related with no supported multi-platform docker with load parameter (PR comment, https://github.com/docker/buildx/issues/59).

Core changes

  • Replace gradle:7-jdk11-alpine docker builder image with eclipse-temurin:11 as gradle:7-jdk11-alpine don't support arm64 architecture.
  • Create Github matrix to build and test each docker platform
  • Create a separate docker publish step without load parameter to publish a multi-platform docker image

Expected behavior:

A multi-platform docker image is published.

Please make sure these boxes are checked before submitting your pull request - thanks!

  • [x] Run the unit tests with gradle test to make sure you didn't break anything
  • [x] Format the title like "feat: [new feature short description]". Title must follow the Conventional Commit Specification(https://www.conventionalcommits.org/en/v1.0.0/).
  • [x] Linked all relevant issues
  • [ ] Include screenshot(s) showing how this pull request works and fixes the issue(s)

davidgamez avatar Jul 05 '23 13:07 davidgamez

I tested in OS and Linux, and I was able to pull the docker image with the right architecture locally. Used:

docker run --rm ghcr.io/mobilitydata/gtfs-validator:latest-test-multiplat --help
docker inspect ghcr.io/mobilitydata/gtfs-validator:latest-test-multiplat

Working Github action example https://github.com/MobilityData/gtfs-validator/actions/runs/5464582100

davidgamez avatar Jul 05 '23 13:07 davidgamez

✅ Rule acceptance tests passed. New Errors: 0 out of 1436 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%. Dropped Errors: 0 out of 1436 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%. New Warnings: 0 out of 1436 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%. Dropped Warnings: 0 out of 1436 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%. 0 out of 1436 sources (~0 %) are corrupted. Commit: f83c55734d6f228ed3711dcd3ea97ed875af86a4 Download the full acceptance test report here (report will disappear after 90 days). ✅ Rule acceptance tests passed.

github-actions[bot] avatar Jul 05 '23 13:07 github-actions[bot]

✅ Rule acceptance tests passed. New Errors: 0 out of 1439 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%. Dropped Errors: 0 out of 1439 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%. New Warnings: 0 out of 1439 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%. Dropped Warnings: 0 out of 1439 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%. 0 out of 1439 sources (~0 %) are corrupted. Commit: 8bce64540bafbbea3888cce77bfe2af77b51690c Download the full acceptance test report here (report will disappear after 90 days). ✅ Rule acceptance tests passed.

github-actions[bot] avatar Aug 10 '23 21:08 github-actions[bot]