Compare commits

..

3 Commits

Author SHA1 Message Date
Jarvis
2357602f50 chore: bump @mosaicstack/mosaic to 0.0.21 for publish
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
2026-04-04 23:09:52 -05:00
1230f6b984 ci: fail publish pipeline loudly on registry/auth/network errors (#396)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/push/publish Pipeline was successful
2026-04-05 03:58:35 +00:00
14b775f1b9 Merge pull request 'fix: populate KNOWN_PACKAGES for mosaic update command' (#395) from fix/populate-known-packages-list into main
Some checks failed
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/push/publish Pipeline failed
Reviewed-on: mosaicstack/mosaic-stack#395
2026-04-05 03:52:57 +00:00

View File

@@ -45,21 +45,27 @@ steps:
# Gitea org rename and caused every @mosaicstack/* publish to fall # Gitea org rename and caused every @mosaicstack/* publish to fall
# on the floor while CI still reported green. # on the floor while CI still reported green.
- | - |
# Portable sh (Alpine ash) — avoid bashisms like PIPESTATUS.
set +e set +e
pnpm --filter "@mosaicstack/*" --filter "!@mosaicstack/web" publish --no-git-checks --access public 2>&1 | tee /tmp/publish.log pnpm --filter "@mosaicstack/*" --filter "!@mosaicstack/web" publish --no-git-checks --access public >/tmp/publish.log 2>&1
EXIT=${PIPESTATUS[0]} EXIT=$?
set -e set -e
cat /tmp/publish.log
if [ "$EXIT" -eq 0 ]; then if [ "$EXIT" -eq 0 ]; then
echo "[publish] all packages published successfully" echo "[publish] all packages published successfully"
exit 0 exit 0
fi fi
# Any hard registry/auth/network error fails the pipeline. # Hard registry / auth / network errors → fatal. Match npm's own
if grep -qE "E404|E401|ENEEDAUTH|ECONNREFUSED|ETIMEDOUT|ENOTFOUND" /tmp/publish.log; then # error lines specifically to avoid false positives on arbitrary
# log text that happens to contain "E404" etc.
if grep -qE "npm (error|ERR!) code (E404|E401|ENEEDAUTH|ECONNREFUSED|ETIMEDOUT|ENOTFOUND)" /tmp/publish.log; then
echo "[publish] FATAL: registry/auth/network error detected — failing pipeline" >&2 echo "[publish] FATAL: registry/auth/network error detected — failing pipeline" >&2
exit 1 exit 1
fi fi
# Tolerate only the specific "version already published" case. # Only tolerate the explicit "version already published" case.
if grep -qE "EPUBLISHCONFLICT|cannot publish over|previously published" /tmp/publish.log; then # npm returns this as E403 with body "You cannot publish over..."
# or EPUBLISHCONFLICT depending on version.
if grep -qE "EPUBLISHCONFLICT|You cannot publish over|previously published" /tmp/publish.log; then
echo "[publish] some packages already at this version — continuing (non-fatal)" echo "[publish] some packages already at this version — continuing (non-fatal)"
exit 0 exit 0
fi fi