A simple, self-hosted continuous delivery tool for Git-based deployments.
Shogun-CD watches a Git repository and deploys changes to your servers via SSH and SFTP. Pipelines and targets are written in YAML, so your delivery setup stays close to the code and manifests it manages.
Shogun helps one Git repository coordinate deployments across many servers.
Status: Active development. SSH and SFTP deployments are ready to use. Kubernetes support is under development.
- Watches a Git repository for changes.
- Runs pipelines when matching files present in the repository change.
- Accepts webhooks from CI systems to run pipelines.
- Copies manifests to servers over SFTP.
- Runs commands on servers over SSH.
- Updates YAML files and pushes the change back to repository.
- Stores secrets encrypted in PostgreSQL.
- Keeps a history of pipeline runs.
Shogun-CD clones your manifest repository and looks for Pipeline and Target YAML files to be indexed. When a matching Git change or webhook arrives, it runs the pipeline steps in order.
This pipeline sends a Compose file to a server and restarts the application when the API changes.
apiVersion: shogun.dev/v1
kind: Pipeline
metadata:
name: deploy-api
enabled: true
spec:
triggers:
- type: git_changes
paths: ["services/api/**"]
steps:
- sync:
target: prod-api
files:
- src: services/api/compose.yaml
dst: ~/api/docker-compose.yaml
- exec:
target: prod-api
commands:
- cd ~/api
- docker compose up -dSee examples for pipeline and target definitions.
| Feature | Description |
|---|---|
| Git triggers | Run pipelines only when selected files change. |
| CI webhooks | Starts a deployment from your CI system. |
| Exec commands | Run deployment commands on a server. |
| SFTP sync | Copy modified files to a server safely from the repo. |
| YAML mutation | Update values in YAML manifests, then commit and push it. |
| Secrets | Store SSH keys and other values encrypted at rest which can be accessed in pipelines. |
| Run history | View pipeline runs and step logs through the API. |
-
Setup docker for postgres container or provide RDS.
-
Copy sample.config.yaml to
config.yamland update it for your environment. -
Add
PipelineandTargetfiles to your Git repository. -
Start Shogun-CD:
$ go run ./cmd
For local development, make start starts PostgreSQL container and runs the app with Air.
When API docs are enabled, open /docs/ in your browser.
- Kubernetes deployments with
apply - Target and pipeline listing API
- CLI for shogun
- UI for Shogun
- API keys
- Live pipeline logs
Licensed under Apache License 2.0. See NOTICE.
Created with ❤️ by SDSLabs!