Conversation
|
I've tested |
0091318 to
ef97f8c
Compare
Split the workflow into two jobs: - test: Build, lint, and test in a Docker runner - build-push: Build and push in a machine executor Commands common to both jobs are factored into commands: - capture_host_info: Capture host and Docker information in an artifact - create_version_json: Create Dockerflow's version.json - login_to_dockerhub: Login if credentials are provided The docker version is updated from 20.10.6 to 20.10.11, the latest. A filter is used to restrict the build-push job to the main branch and tags. There's an additional check to keep PR forks from pushing images. This prepares for building cross-compiled images with buildx, which will require a machine executor.
Add `make cross-build` to build multi-platform images with buildx, and use it when merging to main or tagging.
ef97f8c to
cf53bbe
Compare
|
This worked, but it too 30 minutes to build the two variants, versus about 5 minutes for just the amd64 version. I don't think this will be acceptable, since the arm64 version is mostly for developers. I'm curious if an arm64 server would be any faster: https://circleci.com/docs/2.0/arm-resources/ It may make sense to go back to a previous version of this command, where all the build / lint / test steps were in the same job, and then run the same job on an arm64 machine, and then build the manifest in a follow-on step. This may require using https://www.docker.com/blog/multi-arch-build-and-images-the-simple-way/ It may also require using workflows to get the data from the machine-specific builds to the manifest writer: https://circleci.com/docs/2.0/workflows/#using-workspaces-to-share-data-among-jobs Of course, now we're approaching the effort to migrate to Taskcluster... |
|
I'm going to close this PR. I don't think the end result is worth the effort at this time. As far as I know, 100% of the people that want to run |
For issue #1636, create Docker images with
linux/amd64andlinux/arm64variants. This uses techniques described on the tutorial Building Docker images for multiple operating system architectures.This add
make cross-buildto rundocker buildxto build the multi-platform images, but doesn't ensure thatbuildxis installed and configured.The CircleCI configuration is changed to use a machine image, using similar but slightly different steps. The bundled
dockeris used, and version details are logged and added to an artifact. Awhenstep is used to determine if we're building a tag or themainbranch. If this is the case, thenbuildxis installed and configured, and used to build the image tagged with the SHA1 / tag name, as well as thelatesttag if it is the main branch.