From 92b72d44435c93f8554b9ddaaa0a78050e70da25 Mon Sep 17 00:00:00 2001 From: JustMe Date: Sun, 4 Oct 2026 12:31:27 -0700 Subject: [PATCH] ci: release without blocking on test workflow [CI SKIP] --- .woodpecker/linux-release.yml | 3 -- .woodpecker/release-preflight.yml | 23 --------------- .woodpecker/windows-release.yml | 3 -- ci/wait-for-verified-commit.sh | 49 ------------------------------- docs/deployment.md | 2 +- 5 files changed, 1 insertion(+), 79 deletions(-) delete mode 100644 .woodpecker/release-preflight.yml delete mode 100644 ci/wait-for-verified-commit.sh diff --git a/.woodpecker/linux-release.yml b/.woodpecker/linux-release.yml index 4d90c63..19a7a58 100644 --- a/.woodpecker/linux-release.yml +++ b/.woodpecker/linux-release.yml @@ -12,9 +12,6 @@ when: - event: tag ref: refs/tags/v* -depends_on: - - release-preflight - concurrency: 1 steps: diff --git a/.woodpecker/release-preflight.yml b/.woodpecker/release-preflight.yml deleted file mode 100644 index 63f93a8..0000000 --- a/.woodpecker/release-preflight.yml +++ /dev/null @@ -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 diff --git a/.woodpecker/windows-release.yml b/.woodpecker/windows-release.yml index 019e262..ca53c68 100644 --- a/.woodpecker/windows-release.yml +++ b/.woodpecker/windows-release.yml @@ -12,9 +12,6 @@ when: - event: tag ref: refs/tags/v* -depends_on: - - release-preflight - concurrency: 1 steps: diff --git a/ci/wait-for-verified-commit.sh b/ci/wait-for-verified-commit.sh deleted file mode 100644 index 59b91e5..0000000 --- a/ci/wait-for-verified-commit.sh +++ /dev/null @@ -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 diff --git a/docs/deployment.md b/docs/deployment.md index 401ee09..1b2f8cc 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -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`):