diff --git a/build/ci-Dockerfile b/build/ci-Dockerfile index c82986382b..ad9eff5ce6 100644 --- a/build/ci-Dockerfile +++ b/build/ci-Dockerfile @@ -14,12 +14,11 @@ RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/s chmod +x kubectl && \ mv kubectl /usr/local/bin/ -# Install Node.js and Claude CLI -# Using NodeSource setup script for RHEL-based images -RUN curl -fsSL https://rpm.nodesource.com/setup_20.x | bash - && \ - dnf install -y nodejs && \ - npm install -g @anthropic-ai/claude-code && \ - dnf clean all +# Install Claude CLI (native binary, no Node.js dependency) +# Installer places binary at ~/.local/bin/claude +RUN curl -fsSL https://claude.ai/install.sh | bash && \ + ln -sf ~/.local/bin/claude /usr/local/bin/claude && \ + claude --version # Clone openshift/velero source code for failure analysis # Uses oadp-dev branch to match OADP operator development diff --git a/docs/design/claude-prow-failure-analysis_design.md b/docs/design/claude-prow-failure-analysis_design.md index be0ed279ab..4c9f99c6a6 100644 --- a/docs/design/claude-prow-failure-analysis_design.md +++ b/docs/design/claude-prow-failure-analysis_design.md @@ -63,12 +63,11 @@ RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/s chmod +x kubectl && \ mv kubectl /usr/local/bin/ -# Install Node.js and Claude CLI -# Using NodeSource setup script for RHEL-based images -RUN curl -fsSL https://rpm.nodesource.com/setup_20.x | bash - && \ - dnf install -y nodejs && \ - npm install -g @anthropic-ai/claude-code && \ - dnf clean all +# Install Claude CLI (native binary, no Node.js dependency) +# Installer places binary at ~/.local/bin/claude +RUN curl -fsSL https://claude.ai/install.sh | bash && \ + ln -sf ~/.local/bin/claude /usr/local/bin/claude && \ + claude --version RUN go mod download && \ mkdir -p $(go env GOCACHE) && \ @@ -332,7 +331,7 @@ preprocess_large_artifacts() { # Check for Claude CLI availability if ! command -v claude &> /dev/null; then echo "⚠ Claude CLI not found in PATH" - echo "Skipping Claude analysis (install with: npm install -g @anthropic-ai/claude-code)" + echo "Skipping Claude analysis (install with: curl -fsSL https://claude.ai/install.sh | bash)" exit $EXIT_CODE fi diff --git a/tests/e2e/scripts/analyze_failures.sh b/tests/e2e/scripts/analyze_failures.sh index 999a1d746b..c334450beb 100755 --- a/tests/e2e/scripts/analyze_failures.sh +++ b/tests/e2e/scripts/analyze_failures.sh @@ -171,7 +171,7 @@ preprocess_large_artifacts() { # Check for Claude CLI availability if ! command -v claude &> /dev/null; then echo "⚠ Claude CLI not found in PATH" - echo "Skipping Claude analysis (install with: npm install -g @anthropic-ai/claude-code)" + echo "Skipping Claude analysis (install with: curl -fsSL https://claude.ai/install.sh | bash)" exit $EXIT_CODE fi