mirror of
https://github.com/cozystack/cozystack.git
synced 2026-12-01 20:56:02 +09:00
Release-line image builds read only main's build cache. Once main moved its builder and base images, release-1.7's Dockerfiles stopped matching that cache, and the rc Build step went from 19 to 53 minutes on amd64 and from 10 to 46 on arm64 between v1.7.1-rc.2 and v1.7.2-rc.2. Each line now keeps a cache of its own. build-release.yaml writes buildcache-release-X.Y on every push to the line, and rc builds import it together with main's buildcache. The arm64 rc build, the only arm64 build a line has, keeps buildcache-arm64-release-X.Y itself. CACHE_FROM_TAGS lists every cache a build imports; unset, it is CACHE_TAG, as before. The units of hack/build-matrix.sh now build four at a time (make build- parallel, hack/build-units.sh), since they spend most of their time on registry round trips, one image after another. Every output line carries its unit and is written as it comes, so a job that times out still shows where it stopped. objectstorage-controller waits for the rest because it writes seaweedfs' values.yaml. The rc jobs also leave their buildx builder to the throwaway runner: removing it took up to 11 minutes on arm64. A cache write that fails no longer fails the build (ignore-error=true on every --cache-to): OCIR refuses a blob upload now and then, which already failed the arm64 nightly twice in its last thirty runs, and rc and line builds now write a cache too. Tested with bats: the cache macro, the unit builder against a fake make (the BUILD_JOBS limit, ordering, a failing unit, a failing objectstorage-controller, a unit list that cannot be generated, and output that shows while a unit still builds) and the workflow settings, plus a dry run of hack/build-units.sh over the real units with make -n. Assisted-by: LLM Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>