82 lines
2.3 KiB
YAML
82 lines
2.3 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:先写进工作区(仓库里的版本号只是占位),前端才会带上对的版本
|
|
- bash ci/version.sh apply
|
|
- npm ci --prefix web --prefer-offline
|
|
- timeout 600 npm run build --prefix web
|
|
depends_on: []
|
|
|
|
- name: restore-linux-dependencies
|
|
image: bash
|
|
environment:
|
|
NUGET_PACKAGES: /home/justme/woodpecker/cache/nuget/packages
|
|
commands:
|
|
- python3 ci/run-with-timeout.py 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:
|
|
- 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:
|
|
- 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:
|
|
- bash ci/index-backend-image.sh
|
|
depends_on:
|
|
- linux-amd64-backend
|
|
- linux-arm64-backend
|