mirror of
https://github.com/cozystack/cozystack.git
synced 2026-12-02 21:30:46 +09:00
perf(ci): build release lines from their own cache, in parallel
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>
(cherry picked from commit 12eaa49521)
This commit is contained in:
12 files changed
+251
-35
No files matched your search
@@ -53,6 +53,15 @@ build: build-deps
|
||||
make -C packages/core/installer image
|
||||
make manifests
|
||||
|
||||
# The same images as `build`, with the units in hack/build-matrix.sh built
|
||||
# BUILD_JOBS at a time. The installer goes last because it packs the tree every
|
||||
# other unit stamps.
|
||||
build-parallel: build-deps
|
||||
hack/build-units.sh
|
||||
make -C packages/core/talos image
|
||||
make -C packages/core/installer image
|
||||
make manifests
|
||||
|
||||
manifests:
|
||||
mkdir -p _out/assets
|
||||
cat internal/crdinstall/manifests/*.yaml > _out/assets/cozystack-crds.yaml
|
||||
|
||||
Reference in new issue
Block a user