-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build multi-architecture images (#197)
# What Allows us to push multi-architecture builds for `linux/amd64` and `linux/arm64` on merge to master. Fixes: #196 Tests are performed by building the relevant image and tagging it with the image name the tests expect. This follows the original implementation in `test.sh`. This will likely change to an explicit image name specification as we move the test suite in to Javascript but it's being maintained for now in the interest of simplicity. ## Goals * To decouple image build from the test run. This will help as we refactor the test suite for this issue #191. * Not have CI take a long time due to multi-architecture builds for interim pushes to pull requests. * CI should fail fast if any of the image builds or tests fail * Parallelize builds as much as possible. ## Notes * Since the `unprivileged` and `latest-njs` images build off the base `oss` image, there were some strange moves that had to be done to make that work without rebuilding the base image every time. Specifically, we had to set `setup-buildx-action` to run in `docker` driver mode so we can simply `load` the base image. Otherwise we would have had to use a local repository. However, in `docker` mode `upload-artifact` doesn't like the file produced so we have to save the file again. * I wanted to build images once and then run tests against them and push at the end. However, there was not a clean way to get the full multi-architecture images all the way to the push step so I just build them again against all architectures and perform tests in the runner architecture. This saves us from needing conditionals in the test portions.
- Loading branch information
Showing
2 changed files
with
268 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.