ci: fix release-path docker rerun commands

This commit is contained in:
Peter Steinberger
2026-05-02 13:26:43 +01:00
parent f4a69c4620
commit 237d0869dc
4 changed files with 41 additions and 2 deletions

View File

@@ -94,6 +94,9 @@ runs:
echo "lanes input is required for Docker E2E targeted planning." >&2
exit 1
fi
if [[ "$INCLUDE_RELEASE_PATH_SUITES" == "true" ]]; then
export OPENCLAW_DOCKER_ALL_PROFILE=release-path
fi
export OPENCLAW_DOCKER_ALL_LANES="$LANES"
plan_path=".artifacts/docker-tests/targeted-plan.json"
;;

View File

@@ -978,6 +978,7 @@ jobs:
env:
LANES: ${{ matrix.group.docker_lanes }}
INCLUDE_OPENWEBUI: ${{ inputs.include_openwebui }}
INCLUDE_RELEASE_PATH_SUITES: ${{ inputs.include_release_path_suites }}
run: |
set -euo pipefail
if [[ -z "$LANES" ]]; then
@@ -988,6 +989,9 @@ jobs:
mkdir -p .artifacts/docker-tests
export OPENCLAW_DOCKER_ALL_LANES="$LANES"
export OPENCLAW_DOCKER_ALL_INCLUDE_OPENWEBUI="$INCLUDE_OPENWEBUI"
if [[ "$INCLUDE_RELEASE_PATH_SUITES" == "true" ]]; then
export OPENCLAW_DOCKER_ALL_PROFILE=release-path
fi
plan_path=".artifacts/docker-tests/targeted-plan.json"
node .release-harness/scripts/test-docker-all.mjs --plan-json > "$plan_path"
@@ -1043,6 +1047,9 @@ jobs:
export OPENCLAW_DOCKER_ALL_PREFLIGHT=0
export OPENCLAW_DOCKER_ALL_FAIL_FAST=0
export OPENCLAW_DOCKER_ALL_INCLUDE_OPENWEBUI="${INCLUDE_OPENWEBUI}"
if [[ "${{ inputs.include_release_path_suites }}" == "true" ]]; then
export OPENCLAW_DOCKER_ALL_PROFILE=release-path
fi
export OPENCLAW_DOCKER_ALL_LOG_DIR=".artifacts/docker-tests/targeted-${{ steps.plan.outputs.artifact_suffix }}"
export OPENCLAW_DOCKER_ALL_TIMINGS_FILE=".artifacts/docker-tests/targeted-${{ steps.plan.outputs.artifact_suffix }}-timings.json"
export OPENCLAW_DOCKER_ALL_PNPM_COMMAND="$(command -v pnpm)"

View File

@@ -77,6 +77,10 @@ function shellQuote(value) {
return `'${String(value).replaceAll("'", "'\\''")}'`;
}
function laneNeedsReleasePath(lane) {
return /^bundled-channel(?:-|$)/u.test(lane);
}
function maybeGhcrImage(value) {
return typeof value === "string" && value.startsWith("ghcr.io/") ? value : "";
}
@@ -114,15 +118,18 @@ function commonReuseInputs(entries) {
}
function ghWorkflowCommand(lanes, ref, workflow, reuseInputs = {}) {
const workflowRef = process.env.OPENCLAW_DOCKER_E2E_WORKFLOW_REF || process.env.GITHUB_REF_NAME;
const releasePath = lanes.some(laneNeedsReleasePath);
const fields = [
"gh workflow run",
shellQuote(workflow),
...(workflowRef ? ["--ref", shellQuote(workflowRef)] : []),
"-f",
`ref=${shellQuote(ref)}`,
"-f",
"include_repo_e2e=false",
"-f",
"include_release_path_suites=false",
`include_release_path_suites=${releasePath ? "true" : "false"}`,
"-f",
"include_openwebui=false",
"-f",

View File

@@ -194,16 +194,38 @@ function shellQuote(value) {
return `'${String(value).replaceAll("'", "'\\''")}'`;
}
function githubWorkflowRef() {
const explicit = process.env.OPENCLAW_DOCKER_E2E_WORKFLOW_REF;
if (explicit) {
return explicit;
}
const refName = process.env.GITHUB_REF_NAME;
if (refName) {
return refName;
}
const ref = process.env.GITHUB_REF;
if (ref?.startsWith("refs/heads/")) {
return ref.slice("refs/heads/".length);
}
if (ref?.startsWith("refs/tags/")) {
return ref.slice("refs/tags/".length);
}
return undefined;
}
function githubWorkflowRerunCommand(laneNames, ref) {
const workflowRef = githubWorkflowRef();
const releasePath = process.env.OPENCLAW_DOCKER_ALL_PROFILE === RELEASE_PATH_PROFILE;
const fields = [
"gh workflow run",
shellQuote(process.env.OPENCLAW_DOCKER_E2E_WORKFLOW || DEFAULT_GITHUB_WORKFLOW),
...(workflowRef ? ["--ref", shellQuote(workflowRef)] : []),
"-f",
`ref=${shellQuote(ref)}`,
"-f",
"include_repo_e2e=false",
"-f",
"include_release_path_suites=false",
`include_release_path_suites=${releasePath ? "true" : "false"}`,
"-f",
"include_openwebui=false",
"-f",