ci: release without blocking on test workflow [CI SKIP]
This commit is contained in:
1 parent
67b428991f
commit
92b72d4443
5 files changed
+1
-79
No files matched your search
@@ -12,9 +12,6 @@ when:
|
|||||||
- event: tag
|
- event: tag
|
||||||
ref: refs/tags/v*
|
ref: refs/tags/v*
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- release-preflight
|
|
||||||
|
|
||||||
concurrency: 1
|
concurrency: 1
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
labels:
|
|
||||||
ci: domain-linux-native
|
|
||||||
platform: linux/amd64
|
|
||||||
|
|
||||||
clone:
|
|
||||||
- name: git
|
|
||||||
image: plugin-git
|
|
||||||
settings:
|
|
||||||
lfs: false
|
|
||||||
|
|
||||||
when:
|
|
||||||
- event: tag
|
|
||||||
ref: refs/tags/v*
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: wait-for-push-verification
|
|
||||||
image: bash
|
|
||||||
environment:
|
|
||||||
GITEA_BASE: http://192.168.2.162:3100
|
|
||||||
GITEA_TOKEN:
|
|
||||||
from_secret: gitea_token
|
|
||||||
commands:
|
|
||||||
- bash ci/wait-for-verified-commit.sh
|
|
||||||
@@ -12,9 +12,6 @@ when:
|
|||||||
- event: tag
|
- event: tag
|
||||||
ref: refs/tags/v*
|
ref: refs/tags/v*
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- release-preflight
|
|
||||||
|
|
||||||
concurrency: 1
|
concurrency: 1
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -1,49 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
# Start release builds only after this exact commit passed push verification.
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
[[ "${CI_COMMIT_TAG:-}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?$ ]] || {
|
|
||||||
echo "release preflight must run from a vMAJOR.MINOR.PATCH tag" >&2
|
|
||||||
exit 2
|
|
||||||
}
|
|
||||||
[[ -n "${CI_COMMIT_SHA:-}" ]] || { echo "CI_COMMIT_SHA is required" >&2; exit 2; }
|
|
||||||
[[ -n "${GITEA_TOKEN:-}" ]] || { echo "GITEA_TOKEN is required" >&2; exit 2; }
|
|
||||||
|
|
||||||
gitea_base="${GITEA_BASE:-http://192.168.2.162:3100}"
|
|
||||||
gitea_base="${gitea_base%/}"
|
|
||||||
gitea_host="${gitea_base#https://}"
|
|
||||||
gitea_host="${gitea_host#http://}"
|
|
||||||
gitea_host="${gitea_host%%/*}"
|
|
||||||
gitea_host="${gitea_host%%:*}"
|
|
||||||
tmp="$(mktemp -d)"
|
|
||||||
netrc="$tmp/netrc"
|
|
||||||
statuses_json="$tmp/statuses.json"
|
|
||||||
chmod 700 "$tmp"
|
|
||||||
printf 'machine %s login justme password %s\n' "$gitea_host" "$GITEA_TOKEN" > "$netrc"
|
|
||||||
chmod 600 "$netrc"
|
|
||||||
trap 'rm -rf "$tmp"' EXIT
|
|
||||||
|
|
||||||
verification=""
|
|
||||||
for attempt in $(seq 1 36); do
|
|
||||||
curl --fail-with-body --silent --show-error --retry 3 --netrc-file "$netrc" \
|
|
||||||
"$gitea_base/api/v1/repos/justme/MyMonitor/commits/$CI_COMMIT_SHA/statuses" \
|
|
||||||
-o "$statuses_json"
|
|
||||||
verification="$(jq -r '[.[] | select(.context == "ci/woodpecker/push/verify")] | sort_by(.created_at) | last | .status // ""' "$statuses_json")"
|
|
||||||
case "$verification" in
|
|
||||||
success)
|
|
||||||
echo "push verification passed for ${CI_COMMIT_SHA:0:7}"
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
failure|error)
|
|
||||||
echo "source commit push verification is $verification" >&2
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
if [[ "$attempt" == 36 ]]; then
|
|
||||||
echo "timed out waiting for push verification (last status: ${verification:-missing})" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
sleep 10
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
+1
-1
@@ -36,7 +36,7 @@ Compose 将容器端口只绑定到宿主机 `127.0.0.1:8080`,适合由同机
|
|||||||
|
|
||||||
## 节点二进制发布
|
## 节点二进制发布
|
||||||
|
|
||||||
Woodpecker 在 `vMAJOR.MINOR.PATCH` tag 上,先确认 commit 已通过 push 验证,再由 Windows runner 使用 AotAnywhere 并行构建 Agent/Probe 的 Linux glibc、Linux musl、macOS 和 Windows 产物。Agent 包还包含一次性注册工具 `fleet-enroll`。Linux 归档带有安装脚本和 systemd/OpenWrt 单元;Windows 产物为 `.zip`,Linux/macOS 产物为 `.tar.gz`。所有平台产物和 Backend OCI 镜像成功后,CI 会创建对应的 Gitea Release,并附上压缩包和 SHA-256 校验文件。macOS 产物目前未签名/公证。安装说明见 [`../backend/agent/README.md`](../backend/agent/README.md) 与 [`../backend/probe/README.md`](../backend/probe/README.md)。
|
Woodpecker 在 `vMAJOR.MINOR.PATCH` tag 上,由 Windows runner 使用 AotAnywhere 并行构建 Agent/Probe 的 Linux glibc、Linux musl、macOS 和 Windows 产物。Agent 包还包含一次性注册工具 `fleet-enroll`。Linux 归档带有安装脚本和 systemd/OpenWrt 单元;Windows 产物为 `.zip`,Linux/macOS 产物为 `.tar.gz`。所有平台产物和 Backend OCI 镜像成功后,CI 会创建对应的 Gitea Release,并附上压缩包和 SHA-256 校验文件。macOS 产物目前未签名/公证。安装说明见 [`../backend/agent/README.md`](../backend/agent/README.md) 与 [`../backend/probe/README.md`](../backend/probe/README.md)。
|
||||||
|
|
||||||
实测体积(`StackTraceSupport=false`、`IlcFoldIdenticalMethodBodies=true`、`OptimizationPreference=Size`):
|
实测体积(`StackTraceSupport=false`、`IlcFoldIdenticalMethodBodies=true`、`OptimizationPreference=Size`):
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user