refactor: retire git mirror runtime
This commit is contained in:
+30
-76
@@ -94,43 +94,20 @@ lanes:
|
||||
node: G14
|
||||
sourceBranch: v0.2
|
||||
gitopsBranch: v0.2-gitops
|
||||
gitMirror:
|
||||
namespace: devops-infra
|
||||
serviceReadName: git-mirror-http
|
||||
serviceWriteName: git-mirror-write
|
||||
cachePvcName: hwlab-git-mirror-cache
|
||||
cachePvcStorage: 20Gi
|
||||
cacheHostPath: /var/lib/rancher/k3s/storage/hwlab-d601-v02-git-mirror-cache
|
||||
servicePort: 8080
|
||||
syncConfigMapName: git-mirror-sync-script
|
||||
egressProxy:
|
||||
mode: node-global
|
||||
required: true
|
||||
namespace: platform-infra
|
||||
serviceName: sub2api-egress-proxy
|
||||
port: 10808
|
||||
clientName: d601-global-proxy
|
||||
noProxy:
|
||||
- localhost
|
||||
- 127.0.0.1
|
||||
- ::1
|
||||
- 127.0.0.1:5000
|
||||
- localhost:5000
|
||||
- .svc
|
||||
- .svc.cluster.local
|
||||
- .cluster.local
|
||||
- kubernetes
|
||||
- kubernetes.default
|
||||
- kubernetes.default.svc
|
||||
- 10.0.0.0/8
|
||||
- 10.42.0.0/16
|
||||
- 10.43.0.0/16
|
||||
- 172.16.0.0/12
|
||||
- 192.168.0.0/16
|
||||
- 82.156.23.220
|
||||
- 74.48.78.17
|
||||
- hyueapi.com
|
||||
- .hyueapi.com
|
||||
egressProxy:
|
||||
required: true
|
||||
namespace: platform-infra
|
||||
serviceName: sub2api-egress-proxy
|
||||
port: 10808
|
||||
noProxy:
|
||||
- localhost
|
||||
- 127.0.0.1
|
||||
- ::1
|
||||
- .svc
|
||||
- .svc.cluster.local
|
||||
- .cluster.local
|
||||
- hyueapi.com
|
||||
- .hyueapi.com
|
||||
namespace: hwlab-v02
|
||||
endpoint: https://hwlab.74-48-78-17.nip.io
|
||||
publicEndpoints:
|
||||
@@ -277,49 +254,26 @@ lanes:
|
||||
AGENTRUN_API_KEY: secretRef:hwlab-v02-master-server-admin-api-key/api-key
|
||||
HWLAB_CODE_AGENT_AGENTRUN_RUNNER_NAMESPACE: agentrun-v01
|
||||
HWLAB_CODE_AGENT_AGENTRUN_SECRET_NAMESPACE: agentrun-v01
|
||||
HWLAB_CODE_AGENT_AGENTRUN_REPO_URL: http://git-mirror-http.devops-infra.svc.cluster.local/pikasTech/HWLAB.git
|
||||
HWLAB_CODE_AGENT_AGENTRUN_REPO_URL: http://gitea-http.devops-infra.svc.cluster.local:3000/mirrors/pikasTech-HWLAB.git
|
||||
v03:
|
||||
name: v0.3
|
||||
node: G14
|
||||
sourceBranch: v0.3
|
||||
gitopsBranch: v0.3-gitops
|
||||
gitMirror:
|
||||
namespace: devops-infra
|
||||
serviceReadName: git-mirror-http
|
||||
serviceWriteName: git-mirror-write
|
||||
cachePvcName: hwlab-git-mirror-cache
|
||||
cachePvcStorage: 20Gi
|
||||
cacheHostPath: /var/lib/rancher/k3s/storage/hwlab-d601-v03-git-mirror-cache
|
||||
servicePort: 8080
|
||||
syncConfigMapName: git-mirror-sync-script
|
||||
egressProxy:
|
||||
mode: node-global
|
||||
required: true
|
||||
namespace: platform-infra
|
||||
serviceName: sub2api-egress-proxy
|
||||
port: 10808
|
||||
clientName: d601-global-proxy
|
||||
noProxy:
|
||||
- localhost
|
||||
- 127.0.0.1
|
||||
- ::1
|
||||
- 127.0.0.1:5000
|
||||
- localhost:5000
|
||||
- .svc
|
||||
- .svc.cluster.local
|
||||
- .cluster.local
|
||||
- kubernetes
|
||||
- kubernetes.default
|
||||
- kubernetes.default.svc
|
||||
- 10.0.0.0/8
|
||||
- 10.42.0.0/16
|
||||
- 10.43.0.0/16
|
||||
- 172.16.0.0/12
|
||||
- 192.168.0.0/16
|
||||
- 82.156.23.220
|
||||
- 74.48.78.17
|
||||
- hyueapi.com
|
||||
- .hyueapi.com
|
||||
egressProxy:
|
||||
required: true
|
||||
namespace: platform-infra
|
||||
serviceName: sub2api-egress-proxy
|
||||
port: 10808
|
||||
noProxy:
|
||||
- localhost
|
||||
- 127.0.0.1
|
||||
- ::1
|
||||
- .svc
|
||||
- .svc.cluster.local
|
||||
- .cluster.local
|
||||
- hyueapi.com
|
||||
- .hyueapi.com
|
||||
namespace: hwlab-v03
|
||||
endpoint: https://hwlab.pikapython.com
|
||||
publicEndpoints:
|
||||
@@ -1319,7 +1273,7 @@ lanes:
|
||||
sourceBranch: release
|
||||
gitopsBranch: release-gitops
|
||||
gitReadUrl: http://gitea-http.devops-infra.svc.cluster.local:3000/mirrors/pikasTech-HWLAB.git
|
||||
gitWriteUrl: http://git-mirror-write.devops-infra.svc.cluster.local:8080/pikasTech/HWLAB.git
|
||||
gitWriteUrl: http://gitea-http.devops-infra.svc.cluster.local:3000/mirrors/pikasTech-HWLAB.git
|
||||
artifactCatalog: deploy/artifact-catalog.nc01-production.json
|
||||
runtimePath: runtime-production
|
||||
namespace: hwlab-production
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eu
|
||||
export HWLAB_SERVICE_ID="hwlab-agent-skills"
|
||||
export HWLAB_ARTIFACT_KIND="skills-bundle"
|
||||
export HWLAB_SERVICE_ENTRYPOINT="skills/hwlab-agent-runtime/SKILL.md"
|
||||
export HWLAB_RUNTIME_MODE="${HWLAB_RUNTIME_MODE:-env-reuse-git-mirror-checkout}"
|
||||
export HWLAB_RUNTIME_MODE="${HWLAB_RUNTIME_MODE:-env-reuse-gitea-checkout}"
|
||||
export HWLAB_COMMIT_ID="${HWLAB_BOOT_COMMIT:?HWLAB_BOOT_COMMIT is required}"
|
||||
export HWLAB_REVISION="${HWLAB_BOOT_COMMIT}"
|
||||
export HWLAB_SKILLS_COMMIT_ID="${HWLAB_SKILLS_COMMIT_ID:-${HWLAB_BOOT_COMMIT}}"
|
||||
@@ -81,11 +81,11 @@ function healthPayload() {
|
||||
environment,
|
||||
status: "ok",
|
||||
artifactKind: "skills-bundle",
|
||||
runtimeMode: process.env.HWLAB_RUNTIME_MODE || "env-reuse-git-mirror-checkout",
|
||||
runtimeMode: process.env.HWLAB_RUNTIME_MODE || "env-reuse-gitea-checkout",
|
||||
revision: process.env.HWLAB_REVISION || commitId,
|
||||
commit: {
|
||||
id: commitId,
|
||||
source: process.env.HWLAB_BUILD_SOURCE || "git-mirror-runtime-checkout"
|
||||
source: process.env.HWLAB_BUILD_SOURCE || "gitea-runtime-checkout"
|
||||
},
|
||||
image: {
|
||||
reference: imageReference,
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eu
|
||||
export HWLAB_SERVICE_ID="hwlab-cloud-api"
|
||||
export HWLAB_ARTIFACT_KIND="bun-command"
|
||||
export HWLAB_SERVICE_ENTRYPOINT="cmd/hwlab-cloud-api/main.ts"
|
||||
export HWLAB_RUNTIME_MODE="${HWLAB_RUNTIME_MODE:-env-reuse-git-mirror-checkout}"
|
||||
export HWLAB_RUNTIME_MODE="${HWLAB_RUNTIME_MODE:-env-reuse-gitea-checkout}"
|
||||
export HWLAB_COMMIT_ID="${HWLAB_BOOT_COMMIT:?HWLAB_BOOT_COMMIT is required}"
|
||||
export HWLAB_REVISION="${HWLAB_BOOT_COMMIT}"
|
||||
export HWLAB_IMAGE="${HWLAB_ENVIRONMENT_IMAGE:-${HWLAB_IMAGE:-}}"
|
||||
@@ -13,7 +13,7 @@ export PORT="${PORT:-${HWLAB_CLOUD_API_PORT:-${HWLAB_PORT:-6667}}}"
|
||||
export HWLAB_PORT="$PORT"
|
||||
export HWLAB_CLOUD_API_PORT="$PORT"
|
||||
export HWLAB_CODE_AGENT_AGENTRUN_SOURCE_COMMIT="${HWLAB_CODE_AGENT_AGENTRUN_SOURCE_COMMIT:-${HWLAB_BOOT_COMMIT}}"
|
||||
export HWLAB_CODE_AGENT_AGENTRUN_REPO_URL="${HWLAB_CODE_AGENT_AGENTRUN_REPO_URL:-${HWLAB_BOOT_READ_URL:-http://git-mirror-http.devops-infra.svc.cluster.local/pikasTech/HWLAB.git}}"
|
||||
export HWLAB_CODE_AGENT_AGENTRUN_REPO_URL="${HWLAB_CODE_AGENT_AGENTRUN_REPO_URL:-${HWLAB_BOOT_READ_URL:-http://gitea-http.devops-infra.svc.cluster.local:3000/mirrors/pikasTech-HWLAB.git}}"
|
||||
export HWLAB_CODE_AGENT_WORKSPACE="${HWLAB_CODE_AGENT_WORKSPACE:-$PWD}"
|
||||
export HWLAB_CODE_AGENT_CODEX_WORKSPACE="${HWLAB_CODE_AGENT_CODEX_WORKSPACE:-$HWLAB_CODE_AGENT_WORKSPACE}"
|
||||
export CODEX_HOME="${CODEX_HOME:-/codex-home}"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eu
|
||||
export HWLAB_SERVICE_ID="hwlab-cloud-web"
|
||||
export HWLAB_ARTIFACT_KIND="cloud-web"
|
||||
export HWLAB_SERVICE_ENTRYPOINT="web/hwlab-cloud-web/index.html"
|
||||
export HWLAB_RUNTIME_MODE="${HWLAB_RUNTIME_MODE:-env-reuse-git-mirror-checkout}"
|
||||
export HWLAB_RUNTIME_MODE="${HWLAB_RUNTIME_MODE:-env-reuse-gitea-checkout}"
|
||||
export HWLAB_COMMIT_ID="${HWLAB_BOOT_COMMIT:?HWLAB_BOOT_COMMIT is required}"
|
||||
export HWLAB_REVISION="${HWLAB_BOOT_COMMIT}"
|
||||
export HWLAB_IMAGE="${HWLAB_ENVIRONMENT_IMAGE:-${HWLAB_IMAGE:-}}"
|
||||
@@ -71,11 +71,11 @@ function healthPayload() {
|
||||
environment,
|
||||
status: "ok",
|
||||
artifactKind: "cloud-web",
|
||||
runtimeMode: process.env.HWLAB_RUNTIME_MODE || "env-reuse-git-mirror-checkout",
|
||||
runtimeMode: process.env.HWLAB_RUNTIME_MODE || "env-reuse-gitea-checkout",
|
||||
revision: process.env.HWLAB_REVISION || commitId,
|
||||
commit: {
|
||||
id: commitId,
|
||||
source: process.env.HWLAB_BUILD_SOURCE || "git-mirror-runtime-checkout"
|
||||
source: process.env.HWLAB_BUILD_SOURCE || "gitea-runtime-checkout"
|
||||
},
|
||||
image: {
|
||||
reference: imageReference,
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eu
|
||||
export HWLAB_SERVICE_ID="hwlab-codex-api-responses-forwarder"
|
||||
export HWLAB_ARTIFACT_KIND="bun-command"
|
||||
export HWLAB_SERVICE_ENTRYPOINT="cmd/hwlab-codex-api-responses-forwarder/main.ts"
|
||||
export HWLAB_RUNTIME_MODE="${HWLAB_RUNTIME_MODE:-env-reuse-git-mirror-checkout}"
|
||||
export HWLAB_RUNTIME_MODE="${HWLAB_RUNTIME_MODE:-env-reuse-gitea-checkout}"
|
||||
export HWLAB_COMMIT_ID="${HWLAB_BOOT_COMMIT:?HWLAB_BOOT_COMMIT is required}"
|
||||
export HWLAB_REVISION="${HWLAB_BOOT_COMMIT}"
|
||||
export HWLAB_IMAGE="${HWLAB_ENVIRONMENT_IMAGE:-${HWLAB_IMAGE:-}}"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eu
|
||||
export HWLAB_SERVICE_ID="hwlab-deepseek-responses-bridge"
|
||||
export HWLAB_ARTIFACT_KIND="bun-command"
|
||||
export HWLAB_SERVICE_ENTRYPOINT="cmd/hwlab-deepseek-responses-bridge/main.ts"
|
||||
export HWLAB_RUNTIME_MODE="${HWLAB_RUNTIME_MODE:-env-reuse-git-mirror-checkout}"
|
||||
export HWLAB_RUNTIME_MODE="${HWLAB_RUNTIME_MODE:-env-reuse-gitea-checkout}"
|
||||
export HWLAB_COMMIT_ID="${HWLAB_BOOT_COMMIT:?HWLAB_BOOT_COMMIT is required}"
|
||||
export HWLAB_REVISION="${HWLAB_BOOT_COMMIT}"
|
||||
export HWLAB_IMAGE="${HWLAB_ENVIRONMENT_IMAGE:-${HWLAB_IMAGE:-}}"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eu
|
||||
export HWLAB_SERVICE_ID="hwlab-edge-proxy"
|
||||
export HWLAB_ARTIFACT_KIND="node-command"
|
||||
export HWLAB_SERVICE_ENTRYPOINT="cmd/hwlab-edge-proxy/main.mjs"
|
||||
export HWLAB_RUNTIME_MODE="${HWLAB_RUNTIME_MODE:-env-reuse-git-mirror-checkout}"
|
||||
export HWLAB_RUNTIME_MODE="${HWLAB_RUNTIME_MODE:-env-reuse-gitea-checkout}"
|
||||
export HWLAB_COMMIT_ID="${HWLAB_BOOT_COMMIT:?HWLAB_BOOT_COMMIT is required}"
|
||||
export HWLAB_REVISION="${HWLAB_BOOT_COMMIT}"
|
||||
export HWLAB_IMAGE="${HWLAB_ENVIRONMENT_IMAGE:-${HWLAB_IMAGE:-}}"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eu
|
||||
export HWLAB_SERVICE_ID="hwlab-gateway"
|
||||
export HWLAB_ARTIFACT_KIND="bun-command"
|
||||
export HWLAB_SERVICE_ENTRYPOINT="cmd/hwlab-gateway/main.ts"
|
||||
export HWLAB_RUNTIME_MODE="${HWLAB_RUNTIME_MODE:-env-reuse-git-mirror-checkout}"
|
||||
export HWLAB_RUNTIME_MODE="${HWLAB_RUNTIME_MODE:-env-reuse-gitea-checkout}"
|
||||
export HWLAB_COMMIT_ID="${HWLAB_BOOT_COMMIT:?HWLAB_BOOT_COMMIT is required}"
|
||||
export HWLAB_REVISION="${HWLAB_BOOT_COMMIT}"
|
||||
export HWLAB_IMAGE="${HWLAB_ENVIRONMENT_IMAGE:-${HWLAB_IMAGE:-}}"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eu
|
||||
export HWLAB_SERVICE_ID="hwlab-project-management"
|
||||
export HWLAB_ARTIFACT_KIND="bun-command"
|
||||
export HWLAB_SERVICE_ENTRYPOINT="cmd/hwlab-project-management/main.ts"
|
||||
export HWLAB_RUNTIME_MODE="${HWLAB_RUNTIME_MODE:-env-reuse-git-mirror-checkout}"
|
||||
export HWLAB_RUNTIME_MODE="${HWLAB_RUNTIME_MODE:-env-reuse-gitea-checkout}"
|
||||
export HWLAB_COMMIT_ID="${HWLAB_BOOT_COMMIT:?HWLAB_BOOT_COMMIT is required}"
|
||||
export HWLAB_REVISION="${HWLAB_BOOT_COMMIT}"
|
||||
export HWLAB_IMAGE="${HWLAB_ENVIRONMENT_IMAGE:-${HWLAB_IMAGE:-}}"
|
||||
|
||||
@@ -17,7 +17,7 @@ if (
|
||||
bootRef.includes("..")
|
||||
) fail("HWLAB_BOOT_REF must be a safe branch or ref name");
|
||||
|
||||
const readUrl = process.env.HWLAB_BOOT_READ_URL || mirrorReadUrl(bootRepo);
|
||||
const readUrl = process.env.HWLAB_BOOT_READ_URL || giteaReadUrl(bootRepo);
|
||||
process.env.HWLAB_BUN_COMMAND ||= process.execPath;
|
||||
mkdirSync(path.dirname(checkoutDir), { recursive: true });
|
||||
rmSync(checkoutDir, { recursive: true, force: true });
|
||||
@@ -37,11 +37,11 @@ function requiredEnv(name: string): string {
|
||||
return value;
|
||||
}
|
||||
|
||||
function mirrorReadUrl(repo: string): string {
|
||||
function giteaReadUrl(repo: string): string {
|
||||
if (/github\.com[:/]pikasTech\/HWLAB(?:\.git)?$/u.test(repo)) {
|
||||
return "http://git-mirror-http.devops-infra.svc.cluster.local/pikasTech/HWLAB.git";
|
||||
return "http://gitea-http.devops-infra.svc.cluster.local:3000/mirrors/pikasTech-HWLAB.git";
|
||||
}
|
||||
fail("no mirror resolver for HWLAB_BOOT_REPO; refusing direct runtime GitHub fallback");
|
||||
fail("no Gitea resolver for HWLAB_BOOT_REPO; refusing direct runtime GitHub fallback");
|
||||
}
|
||||
|
||||
function linkNodeModules(): void {
|
||||
|
||||
@@ -14,7 +14,7 @@ if (!/^[A-Za-z0-9._/-]+$/u.test(bootRef) || bootRef.startsWith("-") || bootRef.i
|
||||
fail("HWLAB_BOOT_REF must be a safe branch or ref name");
|
||||
}
|
||||
|
||||
const readUrl = process.env.HWLAB_BOOT_READ_URL || mirrorReadUrl(bootRepo);
|
||||
const readUrl = process.env.HWLAB_BOOT_READ_URL || giteaReadUrl(bootRepo);
|
||||
mkdirSync(path.dirname(checkoutDir), { recursive: true });
|
||||
rmSync(checkoutDir, { recursive: true, force: true });
|
||||
// Go env images avoid npm dependency installation; Go modules stay in Docker/BuildKit layers.
|
||||
@@ -31,11 +31,11 @@ function requiredEnv(name) {
|
||||
return value;
|
||||
}
|
||||
|
||||
function mirrorReadUrl(repo) {
|
||||
function giteaReadUrl(repo) {
|
||||
if (/github\.com[:/]pikasTech\/HWLAB(?:\.git)?$/u.test(repo)) {
|
||||
return "http://git-mirror-http.devops-infra.svc.cluster.local/pikasTech/HWLAB.git";
|
||||
return "http://gitea-http.devops-infra.svc.cluster.local:3000/mirrors/pikasTech-HWLAB.git";
|
||||
}
|
||||
fail("no mirror resolver for HWLAB_BOOT_REPO; refusing direct runtime GitHub fallback");
|
||||
fail("no Gitea resolver for HWLAB_BOOT_REPO; refusing direct runtime GitHub fallback");
|
||||
}
|
||||
|
||||
function run(command, args, cwd, options = {}) {
|
||||
|
||||
Reference in New Issue
Block a user