Files
MoShiro/.woodpecker/linux-release.yml
T
justme 4f5a4aa3a9
ci/woodpecker/push/verify Pipeline failed
ci/woodpecker/push/dev-image Pipeline failed
ci/woodpecker/push/web-build Pipeline failed
ci: stop the whole pipeline on the first failure and report why the restore image is missing [CI]
Every Linux step now runs under ci/guard-step.py. The first step that fails, is cancelled or times out marks the pipeline; running steps get SIGTERM (so traps release flock and Buildah state) then SIGKILL, steps that have not started exit at once, and any process a step leaves behind is killed. A pipeline deadline is the last resort. build-linux-agent.sh now prints the lookup error, store configuration and the restore images present when the prepared restore image cannot be found.
2026-10-21 14:48:40 +08:00

80 lines
2.4 KiB
YAML

labels:
ci: domain-linux-native
platform: linux/amd64
clone:
- name: git
image: plugin-git
settings:
lfs: false
when:
- event: tag
ref: refs/tags/v*
concurrency: 1
steps:
# 前端先打包好(几十秒),两个架构的 Backend 构建再并行:它们把 web/*/dist 内嵌进程序,只读这份产物,不再各自 npm ci
# (并行的两个 npm ci 会同时删 node_modules,互相搞坏)。步骤加了超时:卡住就几分钟内失败,不是耗着。
- name: web-build
image: bash
environment:
NPM_CONFIG_CACHE: /home/justme/.npm
commands:
# 版本取自 tag:先写进工作区(仓库里的版本号只是占位),前端才会带上对的版本
- python3 ci/guard-step.py web-build 900 bash ci/build-release-web.sh
depends_on: []
- name: restore-linux-dependencies
image: bash
environment:
NUGET_PACKAGES: /home/justme/woodpecker/cache/nuget/packages
commands:
- python3 ci/guard-step.py restore-linux-dependencies 1800 bash ci/restore-linux-dependencies.sh release
depends_on:
- web-build
- name: linux-amd64-backend
image: bash
environment:
NUGET_PACKAGES: /home/justme/woodpecker/cache/nuget/packages
ZOT_REGISTRY: registry.oeo.one
ZOT_USERNAME: justme
ZOT_SECRET:
from_secret: zot_secret
commands:
- python3 ci/guard-step.py linux-amd64-backend 1800 bash ci/release-linux.sh amd64 backend
depends_on:
- restore-linux-dependencies
- name: linux-arm64-backend
image: bash
environment:
NUGET_PACKAGES: /home/justme/woodpecker/cache/nuget/packages
ZOT_REGISTRY: registry.oeo.one
ZOT_USERNAME: justme
ZOT_SECRET:
from_secret: zot_secret
commands:
- python3 ci/guard-step.py linux-arm64-backend 1800 bash ci/release-linux.sh arm64 backend
depends_on:
- restore-linux-dependencies
- name: backend-multiarch-index
image: bash
environment:
ZOT_REGISTRY: registry.oeo.one
ZOT_SCHEME: https
ZOT_USERNAME: justme
ZOT_SECRET:
from_secret: zot_secret
RELEASE_API_URL: https://mo.oeo.one
RELEASE_SIGNING_KEY:
from_secret: release_signing_key
commands:
- python3 ci/guard-step.py backend-multiarch-index 900 bash ci/index-backend-image.sh
depends_on:
- linux-amd64-backend
- linux-arm64-backend