fix: 修正 production GitOps 相对路径

This commit is contained in:
root
2026-07-15 18:27:47 +02:00
parent 0597676261
commit 5de3677219
2 changed files with 9 additions and 4 deletions
+1 -1
View File
@@ -975,7 +975,7 @@ lanes:
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
artifactCatalog: deploy/artifact-catalog.nc01-production.json
runtimePath: deploy/gitops/node/nc01/runtime-production
runtimePath: runtime-production
namespace: hwlab-production
imageTagMode: full
endpoint: https://lab.hwpod.com
+8 -3
View File
@@ -9,6 +9,7 @@ import {
runtimeRelativePathForRuntimeLane
} from "./runtime-lane.ts";
import {
gitopsPathForProfile,
namespaceNameForProfile,
parseArgs,
runtimeFrpConfigForProfile,
@@ -20,7 +21,7 @@ import { nodeFrpcManifest } from "./gitops-render/runtime-manifests.mjs";
const namedLaneDeploy = {
nodes: {
NC01: {
gitopsRoot: "deploy/gitops/node/NC01",
gitopsRoot: "deploy/gitops/node/nc01",
sourceRepo: "git@github.com:pikasTech/HWLAB.git"
}
},
@@ -99,7 +100,7 @@ assert.deepEqual({
webEndpoint: resolved.webEndpoint
}, {
nodeId: "NC01",
gitopsRoot: "deploy/gitops/node/NC01",
gitopsRoot: "deploy/gitops/node/nc01",
sourceBranch: "release",
gitopsBranch: "hwlab-production",
gitReadUrl: "http://gitea.example/mirrors/hwlab.git",
@@ -112,6 +113,10 @@ assert.equal(runtimeNamespaceForRuntimeLane(namedLaneDeploy, "production"), "hwl
assert.equal(runtimeRelativePathForRuntimeLane(namedLaneDeploy, "production"), "runtime-production");
assert.equal(namespaceNameForProfile("production", namedLaneDeploy), "hwlab-production");
assert.equal(runtimePathForProfile("production", namedLaneDeploy), "runtime-production");
assert.equal(
gitopsPathForProfile(resolved, "production", namedLaneDeploy),
"deploy/gitops/node/nc01/runtime-production"
);
const services = transformServices({
services: { apiVersion: "v1", kind: "List", items: [] },
@@ -167,4 +172,4 @@ assert.equal(versionResolved.catalogPath, "deploy/artifact-catalog.v03.json");
assert.equal(runtimeNamespaceForRuntimeLane(versionLaneDeploy, "v03"), "hwlab-v03");
assert.equal(runtimeRelativePathForRuntimeLane(versionLaneDeploy, "v03"), "runtime-v03");
console.log(JSON.stringify({ ok: true, tests: 19, namedLane: "production", versionLane: "v03" }));
console.log(JSON.stringify({ ok: true, tests: 20, namedLane: "production", versionLane: "v03" }));