HydraPipeline

HydraPerforce

Perforce changelist watcher. Monitors P4 for new changelists, rsyncs builds to the release server, and notifies downstream services.

Infrastructure

Server visitflanders-perforce (88.198.195.179)
hcloud visitflanders (use HCLOUD_TOKEN, not context)
SSH ssh -i ~/.ssh/hetzner_team_key_perforce_visitflanders.pem root@88.198.195.179
Config /root/.hydraperforce/config.yaml
State /root/.hydraperforce/state.yaml
Service systemctl status hydraperforce
Logs journalctl -u hydraperforce -f
Health GET http://perforce.visitflanders.experiencenet.com:8081/api/v1/health
P4 port ssl:localhost:1666

Operations

Check status

ssh -i ~/.ssh/hetzner_team_key_perforce_visitflanders.pem root@88.198.195.179 "systemctl status hydraperforce"

Check watcher state

ssh -i ~/.ssh/hetzner_team_key_perforce_visitflanders.pem root@88.198.195.179 "cat /root/.hydraperforce/state.yaml"

Shows the last processed changelist number per watched depot path.

View logs

ssh -i ~/.ssh/hetzner_team_key_perforce_visitflanders.pem root@88.198.195.179 "journalctl -u hydraperforce -f"

Restart

ssh -i ~/.ssh/hetzner_team_key_perforce_visitflanders.pem root@88.198.195.179 "systemctl restart hydraperforce"

Update

Auto-updates from releases.experiencenet.com. To force:

ssh -i ~/.ssh/hetzner_team_key_perforce_visitflanders.pem root@88.198.195.179 "echo yes | hydraperforce update"

Key Concepts

Pipeline flow

Perforce depot (P4)
  → HydraPerforce detects new CL
    → rsync build artifacts to release server (46.225.120.7)
      → POST notification to HydraRelease
        → HydraRelease stores build metadata
          → SSE event to downstream (ExperienceLibrary)

P4 ticket

HydraPerforce authenticates to the Perforce server using a P4 ticket stored in the environment. The ticket must be valid for the service user.

Depot watching

Config specifies which depot paths to watch and their corresponding release project names. Each path is polled on a configurable interval (default: 30 seconds).

Troubleshooting

Watcher stuck (not picking up new CLs)

  1. Check if P4 ticket is valid:
    ssh -i ~/.ssh/hetzner_team_key_perforce_visitflanders.pem root@88.198.195.179 "p4 -p ssl:localhost:1666 login -s"
    
  2. If expired, renew the ticket and restart the service
  3. Check state.yaml — the last CL number should increment with new submissions

Rsync to release server failing

  1. Check SSH connectivity from perforce server to release server:
    ssh -i ~/.ssh/hetzner_team_key_perforce_visitflanders.pem root@88.198.195.179 "ssh deploy@releases.experiencenet.com echo ok"
    
  2. Check disk space on both servers
  3. Check logs for rsync error messages

Service won't start

Check config exists and is valid YAML:

ssh -i ~/.ssh/hetzner_team_key_perforce_visitflanders.pem root@88.198.195.179 "cat /root/.hydraperforce/config.yaml"