ci: build the backend image in its own workflow and shorten the panel offer wait [CI]
This commit is contained in:
1 parent
5b1bf09eb0
commit
e0f6667cd7
5 files changed
+58
-26
No files matched your search
@@ -0,0 +1,46 @@
|
||||
labels:
|
||||
ci: domain-linux-native
|
||||
platform: linux/amd64
|
||||
|
||||
clone:
|
||||
- name: git
|
||||
image: plugin-git
|
||||
settings:
|
||||
lfs: false
|
||||
# 要拿到 tag 才算得出开发版本号(ci/version.sh:自最近 tag 的提交数)
|
||||
tags: true
|
||||
|
||||
when:
|
||||
- event: push
|
||||
branch: main
|
||||
evaluate: 'CI_COMMIT_MESSAGE contains "[CI]"'
|
||||
|
||||
# 后端镜像:和 dev-image.yml(Agent 镜像)并行,各自的 restore 只还原自己要用的依赖。构建好之后、推送之前由 ci/wait-for-checks.sh 等 verify 和 web-build。
|
||||
# 前端用 web-build workflow 的产物(ci/shared-web.sh)。
|
||||
|
||||
concurrency: 1
|
||||
|
||||
steps:
|
||||
- name: restore-linux-dependencies
|
||||
image: bash
|
||||
environment:
|
||||
NUGET_PACKAGES: /home/justme/woodpecker/cache/nuget/packages
|
||||
commands:
|
||||
- python3 ci/guard-step.py restore-backend-dependencies 1800 bash ci/restore-linux-dependencies.sh dev-backend
|
||||
depends_on: []
|
||||
|
||||
- name: build-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
|
||||
RELEASE_API_URL: https://mo.oeo.one
|
||||
RELEASE_SIGNING_KEY:
|
||||
from_secret: release_signing_key
|
||||
commands:
|
||||
- python3 ci/guard-step.py build-linux-amd64-backend 1800 bash ci/build-dev-image.sh backend
|
||||
depends_on:
|
||||
- restore-linux-dependencies
|
||||
@@ -15,8 +15,10 @@ when:
|
||||
branch: main
|
||||
evaluate: 'CI_COMMIT_MESSAGE contains "[CI]"'
|
||||
|
||||
# Agent 镜像:三个 RID 的 Agent 构建,构建完发布。后端镜像在 dev-backend-image.yml 里并行构建:Woodpecker 一个 workflow 里的步骤按依赖深度分层,
|
||||
# 下一层要等上一层全部结束,发布放在后端构建(最慢)后面会白等。
|
||||
# 镜像构建和 verify(后端快速测试)、web-build 并行跑,不再等它们:构建好之后、推送之前由 ci/wait-for-checks.sh 等这两个 workflow 都成功
|
||||
# (任何一个失败就不推;提交信息写 [SKIP TESTS] 只跳过后端测试,verify 照样是成功)。机器有 6 个 workflow 槽(WOODPECKER_MAX_WORKFLOWS),三个同时跑放得下。
|
||||
# (任何一个失败就不推;提交信息写 [SKIP TESTS] 只跳过后端测试,verify 照样是成功)。机器有 6 个 workflow 槽(WOODPECKER_MAX_WORKFLOWS),四个同时跑放得下。
|
||||
|
||||
concurrency: 1
|
||||
|
||||
@@ -26,25 +28,9 @@ steps:
|
||||
environment:
|
||||
NUGET_PACKAGES: /home/justme/woodpecker/cache/nuget/packages
|
||||
commands:
|
||||
- python3 ci/guard-step.py restore-linux-dependencies 3600 bash ci/restore-linux-dependencies.sh dev
|
||||
- python3 ci/guard-step.py restore-linux-dependencies 3600 bash ci/restore-linux-dependencies.sh dev-agent
|
||||
depends_on: []
|
||||
|
||||
- name: build-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
|
||||
RELEASE_API_URL: https://mo.oeo.one
|
||||
RELEASE_SIGNING_KEY:
|
||||
from_secret: release_signing_key
|
||||
commands:
|
||||
- python3 ci/guard-step.py build-linux-amd64-backend 1800 bash ci/build-dev-image.sh backend
|
||||
depends_on:
|
||||
- restore-linux-dependencies
|
||||
|
||||
- name: build-arm64-agent-musl
|
||||
image: bash
|
||||
environment:
|
||||
|
||||
Reference in new issue
Block a user