GoCD
Advanced continuous delivery server with pipelines.
Overview
GoCD is an advanced continuous delivery server originally developed by ThoughtWorks, designed around a pipeline-as-code philosophy that emphasizes visualizing and managing complex deployment workflows. Unlike traditional CI/CD tools that focus primarily on build automation, GoCD treats continuous delivery as a first-class citizen with sophisticated pipeline modeling capabilities including fan-in/fan-out dependencies, parallel execution stages, and comprehensive artifact tracing across entire delivery chains. The server component manages pipeline definitions, scheduling, and orchestration while providing a web-based interface for monitoring and controlling deployments.
This stack combines the GoCD server with a lightweight Alpine-based agent that handles the actual build and deployment tasks. The server maintains pipeline state, manages artifacts, and provides the web interface at port 8153, while communicating with agents over HTTPS on port 8154. The agent automatically registers with the server and executes jobs assigned to it, creating a scalable architecture where multiple agents can be added to handle increased workload or specialized environments.
Development teams managing complex microservices architectures, enterprises requiring audit trails and deployment approval workflows, and organizations transitioning from manual deployments to automated continuous delivery will benefit most from GoCD's pipeline modeling capabilities. The Value Stream Map feature provides end-to-end visibility into how code changes flow through multiple services and environments, making it particularly valuable for teams that need to coordinate deployments across interdependent systems and maintain strict change management processes.
Key Features
- Pipeline-as-Code configuration using YAML files for version-controlled deployment workflows
- Value Stream Map visualization showing end-to-end flow from commit to production deployment
- Fan-in and fan-out pipeline dependencies enabling complex workflow orchestration
- Built-in artifact promotion between pipeline stages with traceability
- Agent auto-registration with server discovery and automatic job distribution
- Template-based pipeline creation for standardizing deployment patterns across teams
- Stage-level manual approvals and gates for controlled production deployments
- Real-time pipeline comparison showing differences between environment deployments
Common Use Cases
- 1Microservices deployment coordination where multiple services must be deployed in specific order
- 2Enterprise environments requiring approval workflows and audit trails for production changes
- 3Multi-environment promotion pipelines moving artifacts through dev, staging, and production
- 4Complex build dependencies where downstream services depend on multiple upstream components
- 5Regulated industries needing detailed deployment history and change tracking
- 6Large development teams requiring pipeline templates and standardized deployment processes
- 7Organizations migrating from Jenkins seeking better pipeline visualization and dependency management
Prerequisites
- Minimum 2GB RAM for GoCD server with additional 512MB per agent
- Docker and Docker Compose installed on host system
- Ports 8153 and 8154 available for GoCD web interface and agent communication
- Basic understanding of continuous integration and deployment pipeline concepts
- Git repository access for pipeline configuration and source code management
- SSL certificate setup recommended for production HTTPS communication between server and agents
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 gocd-server: 3 image: gocd/gocd-server:latest4 container_name: gocd-server5 restart: unless-stopped6 ports: 7 - "8153:8153"8 - "8154:8154"9 volumes: 10 - gocd_data:/godata11 - gocd_home:/home/go1213 gocd-agent: 14 image: gocd/gocd-agent-alpine-3.18:latest15 container_name: gocd-agent16 restart: unless-stopped17 depends_on: 18 - gocd-server19 environment: 20 GO_SERVER_URL: https://gocd-server:8154/go21 volumes: 22 - gocd_agent:/godata2324volumes: 25 gocd_data: 26 gocd_home: 27 gocd_agent: .env Template
.env
1# No environment variables required for basic setupUsage Notes
- 1Docs: https://docs.gocd.org/current/
- 2Access at http://localhost:8153 (HTTPS on 8154)
- 3Agent auto-registers with server via GO_SERVER_URL
- 4Pipelines: define in UI or config-as-code repo (gocd.yaml)
- 5Value Stream Map visualizes end-to-end deployment flow
- 6Fan-in/fan-out dependencies built into pipeline model
Individual Services(2 services)
Copy individual services to mix and match with your existing compose files.
gocd-server
gocd-server:
image: gocd/gocd-server:latest
container_name: gocd-server
restart: unless-stopped
ports:
- "8153:8153"
- "8154:8154"
volumes:
- gocd_data:/godata
- gocd_home:/home/go
gocd-agent
gocd-agent:
image: gocd/gocd-agent-alpine-3.18:latest
container_name: gocd-agent
restart: unless-stopped
depends_on:
- gocd-server
environment:
GO_SERVER_URL: https://gocd-server:8154/go
volumes:
- gocd_agent:/godata
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 gocd-server:5 image: gocd/gocd-server:latest6 container_name: gocd-server7 restart: unless-stopped8 ports:9 - "8153:8153"10 - "8154:8154"11 volumes:12 - gocd_data:/godata13 - gocd_home:/home/go1415 gocd-agent:16 image: gocd/gocd-agent-alpine-3.18:latest17 container_name: gocd-agent18 restart: unless-stopped19 depends_on:20 - gocd-server21 environment:22 GO_SERVER_URL: https://gocd-server:8154/go23 volumes:24 - gocd_agent:/godata2526volumes:27 gocd_data:28 gocd_home:29 gocd_agent:30EOF3132# 2. Create the .env file33cat > .env << 'EOF'34# No environment variables required for basic setup35EOF3637# 3. Start the services38docker compose up -d3940# 4. View logs41docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/gocd/run | bashTroubleshooting
- Agent shows as 'Lost Contact' status: Check GO_SERVER_URL environment variable matches server hostname and verify port 8154 connectivity
- Pipeline fails with 'No agents available': Ensure agent container is running and registered, check agent resources match job requirements
- Server web interface returns 502 errors: Wait 2-3 minutes for complete server startup, check gocd_data volume permissions
- Git checkout fails in pipeline: Configure SSH keys or credentials in GoCD server admin settings
- Pipeline stays in 'Scheduled' state: Verify agent has required resources and check server logs for scheduling conflicts
- Agent registration fails with SSL errors: Add server SSL certificate to agent trust store or configure GO_SERVER_URL with proper SSL settings
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Ad Space
Shortcuts: C CopyF FavoriteD Download