feature/ci (#84)

Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/harb/pulls/84
This commit is contained in:
johba 2026-02-02 19:24:57 +01:00
parent beefe22f90
commit 4277f19b68
41 changed files with 3149 additions and 298 deletions

60
scripts/build-ci-images.sh Executable file
View file

@ -0,0 +1,60 @@
#!/bin/bash
# Build and push CI images for E2E testing
set -euo pipefail
cd "$(dirname "$0")/.."
REGISTRY="${REGISTRY:-registry.niovi.voyage}"
TAG="${TAG:-latest}"
echo "=== Building CI images ==="
echo "Registry: $REGISTRY"
echo "Tag: $TAG"
# Build ponder-ci
echo ""
echo "=== Building ponder-ci ==="
docker build \
-f docker/Dockerfile.ponder-ci \
-t "$REGISTRY/harb/ponder-ci:$TAG" \
.
# Build webapp-ci
echo ""
echo "=== Building webapp-ci ==="
docker build \
-f docker/Dockerfile.webapp-ci \
-t "$REGISTRY/harb/webapp-ci:$TAG" \
.
# Build landing-ci
echo ""
echo "=== Building landing-ci ==="
docker build \
-f docker/Dockerfile.landing-ci \
-t "$REGISTRY/harb/landing-ci:$TAG" \
.
# Build txnbot-ci
echo ""
echo "=== Building txnbot-ci ==="
docker build \
-f docker/Dockerfile.txnbot-ci \
-t "$REGISTRY/harb/txnbot-ci:$TAG" \
.
echo ""
echo "=== All images built ==="
echo ""
# Push if requested
if [[ "${PUSH:-false}" == "true" ]]; then
echo "=== Pushing images to registry ==="
docker push "$REGISTRY/harb/ponder-ci:$TAG"
docker push "$REGISTRY/harb/webapp-ci:$TAG"
docker push "$REGISTRY/harb/landing-ci:$TAG"
docker push "$REGISTRY/harb/txnbot-ci:$TAG"
echo "=== All images pushed ==="
else
echo "To push images, run: PUSH=true $0"
fi

View file

@ -0,0 +1,33 @@
#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")/.."
REGISTRY="${REGISTRY:-registry.niovi.voyage}"
IMAGE_NAME="${IMAGE_NAME:-harb/integration}"
TAG="${TAG:-latest}"
FULL_IMAGE="${REGISTRY}/${IMAGE_NAME}:${TAG}"
echo "Building integration image: ${FULL_IMAGE}"
echo "This may take 5-10 minutes on first build..."
# Build kraiken-lib first (required by the image)
echo "=== Building kraiken-lib ==="
./scripts/build-kraiken-lib.sh
# Build the integration image
echo "=== Building Docker image ==="
docker build \
-f docker/Dockerfile.integration \
-t "${FULL_IMAGE}" \
--progress=plain \
.
echo ""
echo "✓ Image built successfully: ${FULL_IMAGE}"
echo ""
echo "To test locally:"
echo " docker run --rm --privileged -p 8081:8081 ${FULL_IMAGE}"
echo ""
echo "To push to registry:"
echo " docker push ${FULL_IMAGE}"

View file

@ -17,7 +17,7 @@ PID_FILE=/tmp/kraiken-watcher.pid
PROJECT_NAME=${COMPOSE_PROJECT_NAME:-$(basename "$PWD")}
# Detect container runtime
if command -v docker compose &> /dev/null; then
if docker compose version &> /dev/null; then
COMPOSE_CMD="docker compose"
RUNTIME_CMD="docker"
elif command -v docker-compose &> /dev/null; then