CI: stop wiping shared bread-ecosystem clones mid-job
All checks were successful
dev release / build (push) Successful in 49s
All checks were successful
dev release / build (push) Successful in 49s
Another product's gen-index step was deleting /tmp/bread-ecosystem-ci-* between breadhelp's build and test, so the test step 127'd on a missing ci/build.sh.
This commit is contained in:
parent
5ae12e3701
commit
d42d6632c6
2 changed files with 6 additions and 6 deletions
|
|
@ -71,10 +71,10 @@ jobs:
|
||||||
echo "::error::BAKERY_MINISIGN_SEC_KEY_PATH secret not set — refusing to regenerate dev index.json unsigned (would leave a stale signature mismatched against fresh content and break bakery for everyone on the dev track)"
|
echo "::error::BAKERY_MINISIGN_SEC_KEY_PATH secret not set — refusing to regenerate dev index.json unsigned (would leave a stale signature mismatched against fresh content and break bakery for everyone on the dev track)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
rm -rf /tmp/bread-ecosystem-ci-* 2>/dev/null || true
|
# Do not wipe /tmp/bread-ecosystem-ci-* — other products' ci/build.sh
|
||||||
# mktemp: a fixed clone path races when multiple repos' dev/beta
|
# caches live there and a wipe between their build and test steps
|
||||||
# workflows run close together on the same self-hosted runner.
|
# is a 127 (missing ci/build.sh).
|
||||||
ECOSYSTEM_CI_DIR="$(mktemp -d /tmp/bread-ecosystem-ci-XXXXXX)"
|
ECOSYSTEM_CI_DIR="$(mktemp -d /tmp/bread-ecosystem-index-XXXXXX)"
|
||||||
git clone --branch main https://git.breadway.dev/Breadway/bread-ecosystem.git "${ECOSYSTEM_CI_DIR}"
|
git clone --branch main https://git.breadway.dev/Breadway/bread-ecosystem.git "${ECOSYSTEM_CI_DIR}"
|
||||||
TRACK=dev bash "${ECOSYSTEM_CI_DIR}/scripts/gen-index.sh"
|
TRACK=dev bash "${ECOSYSTEM_CI_DIR}/scripts/gen-index.sh"
|
||||||
rm -rf "${ECOSYSTEM_CI_DIR}"
|
rm -rf "${ECOSYSTEM_CI_DIR}"
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,8 @@ ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||||
REV="$(cat "${ROOT}/ci/bread-ecosystem.rev")"
|
REV="$(cat "${ROOT}/ci/bread-ecosystem.rev")"
|
||||||
|
|
||||||
CACHE_DIR="/tmp/bread-ecosystem-ci-${REV}"
|
CACHE_DIR="/tmp/bread-ecosystem-ci-${REV}"
|
||||||
if [ ! -d "$CACHE_DIR" ]; then
|
if [ ! -f "$CACHE_DIR/ci/build.sh" ]; then
|
||||||
rm -rf /tmp/bread-ecosystem-ci-*
|
rm -rf "$CACHE_DIR"
|
||||||
git clone https://git.breadway.dev/Breadway/bread-ecosystem.git "$CACHE_DIR"
|
git clone https://git.breadway.dev/Breadway/bread-ecosystem.git "$CACHE_DIR"
|
||||||
git -C "$CACHE_DIR" checkout --quiet "$REV"
|
git -C "$CACHE_DIR" checkout --quiet "$REV"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue