Build musl and glibc for amd64 and arm64 through one native package path. Reuse musl outputs for OCI images and OpenWrt installers, and export binaries inside a rootless unshare session. Restore the executable dependency graph into a shared persistent NuGet cache, build managed dependencies once, and run isolated native publishes in parallel. Clean temporary outputs and expired image layers under store locks, retire inactive legacy stores after seven days, and retain two toolchain exports. Add regression coverage for staging, extraction, packaging and cleanup boundaries.
14 lines
878 B
Bash
14 lines
878 B
Bash
#!/usr/bin/env bash
|
|
# Build the development Backend image; Agent images consume Linux native packages.
|
|
set -euo pipefail
|
|
[[ "${1:-}" == backend && "${2:-amd64}" == amd64 ]] || { echo 'usage: build-dev-image.sh backend [amd64]' >&2; exit 2; }
|
|
[[ "${CI_PIPELINE_EVENT:-}" == push && "${CI_COMMIT_BRANCH:-}" == main && "${CI_COMMIT_MESSAGE:-}" == *'[CI]'* ]] || exit 2
|
|
root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
source "$root/ci/version.sh"
|
|
registry="${ZOT_REGISTRY:-registry.oeo.one}"
|
|
export BUILDAH_HOME=/home/justme/woodpecker/buildah-home/dev-image-build-noble-aot-v1-backend-amd64
|
|
export ZOT_IMAGE_REPOSITORY="$registry/moshiro-dev/moshiro-backend"
|
|
export IMAGE_TAGS="latest,$MOSHIRO_VERSION" IMAGE_PUBLISH=true
|
|
export MOSHIRO_PUSH_GATE="$root/ci/wait-for-checks.sh"
|
|
exec python3 "$root/ci/run-with-timeout.py" 1800 bash "$root/ci/release-linux.sh" amd64 backend
|