mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-04 14:30:24 +00:00
fix(qa): support neutral-cwd docker commands
This commit is contained in:
committed by
Peter Steinberger
parent
816a3eae8a
commit
76bde3d42b
@@ -65,9 +65,11 @@ async function runQaUi(opts: {
|
||||
}
|
||||
|
||||
async function runQaDockerScaffold(opts: {
|
||||
repoRoot?: string;
|
||||
outputDir: string;
|
||||
gatewayPort?: number;
|
||||
qaLabPort?: number;
|
||||
providerBaseUrl?: string;
|
||||
image?: string;
|
||||
usePrebuiltImage?: boolean;
|
||||
bindUiDist?: boolean;
|
||||
@@ -76,12 +78,13 @@ async function runQaDockerScaffold(opts: {
|
||||
await runtime.runQaDockerScaffoldCommand(opts);
|
||||
}
|
||||
|
||||
async function runQaDockerBuildImage(opts: { image?: string }) {
|
||||
async function runQaDockerBuildImage(opts: { repoRoot?: string; image?: string }) {
|
||||
const runtime = await loadQaLabCliRuntime();
|
||||
await runtime.runQaDockerBuildImageCommand(opts);
|
||||
}
|
||||
|
||||
async function runQaDockerUp(opts: {
|
||||
repoRoot?: string;
|
||||
outputDir?: string;
|
||||
gatewayPort?: number;
|
||||
qaLabPort?: number;
|
||||
@@ -227,6 +230,7 @@ export function registerQaLabCli(program: Command) {
|
||||
|
||||
qa.command("docker-scaffold")
|
||||
.description("Write a prebaked Docker scaffold for the QA dashboard + gateway lane")
|
||||
.option("--repo-root <path>", "Repository root to target when running from a neutral cwd")
|
||||
.requiredOption("--output-dir <path>", "Output directory for docker-compose + state files")
|
||||
.option("--gateway-port <port>", "Gateway host port", (value: string) => Number(value))
|
||||
.option("--qa-lab-port <port>", "QA lab host port", (value: string) => Number(value))
|
||||
@@ -240,6 +244,7 @@ export function registerQaLabCli(program: Command) {
|
||||
)
|
||||
.action(
|
||||
async (opts: {
|
||||
repoRoot?: string;
|
||||
outputDir: string;
|
||||
gatewayPort?: number;
|
||||
qaLabPort?: number;
|
||||
@@ -254,13 +259,15 @@ export function registerQaLabCli(program: Command) {
|
||||
|
||||
qa.command("docker-build-image")
|
||||
.description("Build the prebaked QA Docker image with qa-channel + qa-lab bundled")
|
||||
.option("--repo-root <path>", "Repository root to target when running from a neutral cwd")
|
||||
.option("--image <name>", "Image tag", "openclaw:qa-local-prebaked")
|
||||
.action(async (opts: { image?: string }) => {
|
||||
.action(async (opts: { repoRoot?: string; image?: string }) => {
|
||||
await runQaDockerBuildImage(opts);
|
||||
});
|
||||
|
||||
qa.command("up")
|
||||
.description("Build the QA site, start the Docker-backed QA stack, and print the QA Lab URL")
|
||||
.option("--repo-root <path>", "Repository root to target when running from a neutral cwd")
|
||||
.option("--output-dir <path>", "Output directory for docker-compose + state files")
|
||||
.option("--gateway-port <port>", "Gateway host port", (value: string) => Number(value))
|
||||
.option("--qa-lab-port <port>", "QA lab host port", (value: string) => Number(value))
|
||||
@@ -275,6 +282,7 @@ export function registerQaLabCli(program: Command) {
|
||||
.option("--skip-ui-build", "Skip pnpm qa:lab:build before starting Docker", false)
|
||||
.action(
|
||||
async (opts: {
|
||||
repoRoot?: string;
|
||||
outputDir?: string;
|
||||
gatewayPort?: number;
|
||||
qaLabPort?: number;
|
||||
|
||||
Reference in New Issue
Block a user