From 5de36772196f49b830cc48789ce34ffbc0654a0f Mon Sep 17 00:00:00 2001 From: root Date: Wed, 15 Jul 2026 18:27:47 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=20production=20GitOps?= =?UTF-8?q?=20=E7=9B=B8=E5=AF=B9=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/deploy.yaml | 2 +- scripts/src/runtime-lane.test.mjs | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/deploy/deploy.yaml b/deploy/deploy.yaml index 73db10cc..60c0dac6 100644 --- a/deploy/deploy.yaml +++ b/deploy/deploy.yaml @@ -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 diff --git a/scripts/src/runtime-lane.test.mjs b/scripts/src/runtime-lane.test.mjs index a9c43410..fad05c70 100644 --- a/scripts/src/runtime-lane.test.mjs +++ b/scripts/src/runtime-lane.test.mjs @@ -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" }));