mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 15:00:41 +00:00
test: skip bootstrap in release validation onboarding
This commit is contained in:
@@ -39,7 +39,11 @@ trap cleanup EXIT
|
||||
|
||||
echo "Installing mounted OpenClaw package into root-owned global npm..."
|
||||
package_tgz="${OPENCLAW_CURRENT_PACKAGE_TGZ:?missing OPENCLAW_CURRENT_PACKAGE_TGZ}"
|
||||
npm install -g "$package_tgz" --no-fund --no-audit >/tmp/openclaw-root-owned-install.log 2>&1
|
||||
if ! npm install -g "$package_tgz" --no-fund --no-audit >/tmp/openclaw-root-owned-install.log 2>&1; then
|
||||
echo "root-owned global npm install failed" >&2
|
||||
cat /tmp/openclaw-root-owned-install.log >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
root="$(package_root)"
|
||||
test -d "$root/dist/extensions/$CHANNEL"
|
||||
|
||||
@@ -1559,29 +1559,12 @@ async function ensureDevUpdateGitInstall(params) {
|
||||
|
||||
async function runOnboardWithInstalledCli(params) {
|
||||
await withAllocatedGatewayPort(params.lane, async () => {
|
||||
const args = [
|
||||
"onboard",
|
||||
"--non-interactive",
|
||||
"--mode",
|
||||
"local",
|
||||
"--auth-choice",
|
||||
params.providerConfig.authChoice,
|
||||
"--secret-input-mode",
|
||||
"ref",
|
||||
"--gateway-port",
|
||||
String(params.lane.gatewayPort),
|
||||
"--gateway-bind",
|
||||
"loopback",
|
||||
"--skip-skills",
|
||||
"--accept-risk",
|
||||
"--json",
|
||||
];
|
||||
if (params.installDaemon) {
|
||||
args.push("--install-daemon");
|
||||
}
|
||||
if (!params.installDaemon || shouldSkipInstallerDaemonHealthCheck()) {
|
||||
args.push("--skip-health");
|
||||
}
|
||||
const args = buildReleaseOnboardArgs({
|
||||
authChoice: params.providerConfig.authChoice,
|
||||
gatewayPort: params.lane.gatewayPort,
|
||||
installDaemon: params.installDaemon,
|
||||
skipHealth: !params.installDaemon || shouldSkipInstallerDaemonHealthCheck(),
|
||||
});
|
||||
await runInstalledCli({
|
||||
cliPath: params.cliPath,
|
||||
args,
|
||||
@@ -1593,6 +1576,34 @@ async function runOnboardWithInstalledCli(params) {
|
||||
});
|
||||
}
|
||||
|
||||
export function buildReleaseOnboardArgs(params) {
|
||||
const args = [
|
||||
"onboard",
|
||||
"--non-interactive",
|
||||
"--mode",
|
||||
"local",
|
||||
"--auth-choice",
|
||||
params.authChoice,
|
||||
"--secret-input-mode",
|
||||
"ref",
|
||||
"--gateway-port",
|
||||
String(params.gatewayPort),
|
||||
"--gateway-bind",
|
||||
"loopback",
|
||||
"--skip-skills",
|
||||
"--skip-bootstrap",
|
||||
"--accept-risk",
|
||||
"--json",
|
||||
];
|
||||
if (params.installDaemon) {
|
||||
args.push("--install-daemon");
|
||||
}
|
||||
if (params.skipHealth) {
|
||||
args.push("--skip-health");
|
||||
}
|
||||
return args;
|
||||
}
|
||||
|
||||
async function startManualGatewayFromInstalledCli(params) {
|
||||
mkdirSync(dirname(params.logPath), { recursive: true });
|
||||
const gatewayLog = createWriteStream(params.logPath, { flags: "a" });
|
||||
@@ -2360,24 +2371,11 @@ async function runOnboard(params) {
|
||||
await runOpenClaw({
|
||||
lane: params.lane,
|
||||
env: params.env,
|
||||
args: [
|
||||
"onboard",
|
||||
"--non-interactive",
|
||||
"--mode",
|
||||
"local",
|
||||
"--auth-choice",
|
||||
params.providerConfig.authChoice,
|
||||
"--secret-input-mode",
|
||||
"ref",
|
||||
"--gateway-port",
|
||||
String(params.lane.gatewayPort),
|
||||
"--gateway-bind",
|
||||
"loopback",
|
||||
"--skip-skills",
|
||||
"--skip-health",
|
||||
"--accept-risk",
|
||||
"--json",
|
||||
],
|
||||
args: buildReleaseOnboardArgs({
|
||||
authChoice: params.providerConfig.authChoice,
|
||||
gatewayPort: params.lane.gatewayPort,
|
||||
skipHealth: true,
|
||||
}),
|
||||
logPath: params.logPath,
|
||||
timeoutMs: 10 * 60 * 1000,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user