Skip to content
65 changes: 65 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1323,3 +1323,68 @@ services:
volumes:
- name: integration-test
path: /integration-test

---
kind: pipeline
type: docker
name: build-wolf

trigger:
event:
- tag

steps:
- name: clone-wolf
image: alpine/git:latest
environment:
SSH_KEY:
from_secret: github_ssh_key
commands:
# Setup SSH for git operations
- mkdir -p ~/.ssh
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan github.com >> ~/.ssh/known_hosts
# Clone Wolf and tag it with Helix version
- git clone git@github.com:helixml/wolf.git /drone/src/wolf
- cd /drone/src/wolf
- git config user.email "drone@helix.ml"
- git config user.name "Helix Drone CI"
- echo "Tagging Wolf stable branch with ${DRONE_TAG}"
- git tag -a "${DRONE_TAG}" -m "Release ${DRONE_TAG} (built with Helix ${DRONE_TAG})"
- git push origin "${DRONE_TAG}" || echo "Tag ${DRONE_TAG} already exists, continuing..."
- echo "Building Wolf from stable branch for Helix version ${DRONE_TAG}"
when:
event:
- tag

- name: publish-wolf
image: plugins/docker
pull: always
environment:
DOCKER_BUILDKIT: 1
settings:
dockerfile: /drone/src/wolf/docker/wolf.Dockerfile
context: /drone/src/wolf
auto_tag: true
daemon_off: true
registry: registry.helixml.tech
repo: registry.helixml.tech/helix/wolf
username: admin
password:
from_secret: helix_registry_password
build_args:
- BASE_IMAGE=ghcr.io/games-on-whales/gstreamer:1.26.7
volumes:
- name: dockersocket
path: /var/run/docker.sock
when:
event:
- tag
depends_on:
- clone-wolf

volumes:
- name: dockersocket
host:
path: /var/run/docker.sock
7 changes: 3 additions & 4 deletions docker-compose.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,9 @@ services:

wolf:
profiles: [wolf]
# Using public upstream image for ARM64 compatibility (local build not available on Apple Silicon)
# For local dev builds: uncomment wolf:helix-fixed and comment this out, but requires x86_64
# image: wolf:helix-fixed
image: ghcr.io/games-on-whales/wolf:wolf-ui
# Development: uses latest from registry by default
# For local builds: export WOLF_LOCAL_BUILD=true && ./stack rebuild-wolf
image: ${WOLF_LOCAL_BUILD:+wolf:helix-fixed}${WOLF_LOCAL_BUILD:-registry.helixml.tech/helix/wolf:latest}
networks:
default:
ipv4_address: 172.19.0.50
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ services:
# Helix Code services (Wolf streaming + Zed agents + Moonlight Web)
wolf:
profiles: [code]
image: registry.helixml.tech/helix/wolf:${HELIX_VERSION:-latest}
image: registry.helixml.tech/helix/wolf:latest
networks:
default:
ipv4_address: 172.19.0.50
Expand Down
41 changes: 11 additions & 30 deletions stack
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ function push_image_tags() {
}

function rebuild-wolf() {
echo "🐺 Rebuilding Wolf container with latest source code..."
echo "🐺 Building Wolf container from local source..."

# Check if Wolf source directory exists
if [ ! -d "../wolf" ]; then
Expand All @@ -685,52 +685,29 @@ function rebuild-wolf() {
echo ""
echo "Please run:"
echo " cd .."
echo " git clone https://github.com/games-on-whales/wolf.git"
echo " git clone https://github.com/helixml/wolf.git"
echo " cd helix"
echo " ./stack rebuild-wolf"
exit 1
fi

# Build Wolf container with image tags
local COMMIT_HASH=$(git rev-parse --short HEAD)
local GIT_TAG=$(git describe --exact-match --tags HEAD 2>/dev/null || echo "")

# Build Wolf container locally (no registry push - releases handled by Helix CI)
echo "🔨 Building Wolf container from source..."
cd ../wolf

if [ -n "$GIT_TAG" ]; then
echo "🏷️ Git tag detected: ${GIT_TAG}"
docker build -f docker/wolf.Dockerfile \
-t wolf:helix-fixed \
-t "registry.helixml.tech/helix/wolf:${COMMIT_HASH}" \
-t "registry.helixml.tech/helix/wolf:${GIT_TAG}" \
.
else
docker build -f docker/wolf.Dockerfile \
-t wolf:helix-fixed \
-t "registry.helixml.tech/helix/wolf:${COMMIT_HASH}" \
.
fi
docker build -f docker/wolf.Dockerfile -t wolf:helix-fixed .

if [ $? -eq 0 ]; then
echo "✅ Wolf container built successfully"
echo "✅ Wolf container built successfully as wolf:helix-fixed"
else
echo "❌ Failed to build Wolf container"
cd - > /dev/null
return 1
fi
cd - > /dev/null

# Push to registry only in production mode (when PUSH_TO_REGISTRY is set)
if [ -n "${PUSH_TO_REGISTRY:-}" ]; then
local IMAGE_BASE="registry.helixml.tech/helix/wolf"
if push_image_tags "$IMAGE_BASE"; then
echo "✅ Wolf images pushed to registry successfully"
else
echo "⚠️ Failed to push Wolf images to registry (continuing anyway)"
fi
echo "📦 Registry images pushed"
fi
# Export WOLF_LOCAL_BUILD so it persists for subsequent ./stack commands in this shell
export WOLF_LOCAL_BUILD=true

# Remove and recreate Wolf container to use updated image (skip if SKIP_DEV_RESTART is set)
if [ -z "${SKIP_DEV_RESTART:-}" ]; then
Expand All @@ -740,6 +717,10 @@ function rebuild-wolf() {

echo "✅ Wolf container rebuilt and restarted successfully"
echo "🐺 Wolf is ready for testing with latest source code changes"
echo ""
echo "💡 WOLF_LOCAL_BUILD=true is now set in your current shell"
echo "💡 Future ./stack commands will continue using wolf:helix-fixed"
echo "💡 To go back to latest: unset WOLF_LOCAL_BUILD"
fi
}

Expand Down