Skip to content

Getting Started

Install

Download the latest release for your platform:

# Linux (amd64)
curl -L https://github.com/xescugc/pikoci/releases/latest/download/linux-amd64 -o pikoci
chmod +x pikoci

# macOS (amd64)
curl -L https://github.com/xescugc/pikoci/releases/latest/download/darwin-amd64 -o pikoci
chmod +x pikoci

Or pull the Docker image:

docker pull xescugc/pikoci:latest

Or build from source:

git clone https://github.com/xescugc/pikoci.git
cd pikoci
go build -o pikoci .

Run with a pipeline

The fastest way to start. Pass a pipeline config at launch and it's ready immediately:

./pikoci server \
  --db-system mem \
  --pubsub-system mem \
  --jwt-secret my-secret \
  --run-worker \
  --pipeline-name my-pipeline \
  --pipeline-config pipeline.hcl

Open http://localhost:8080 and log in with admin / admin123.

Example pipeline

A cron resource checks for new versions every 10 seconds. When detected, it triggers the echo job:

resource "cron" "my_cron" {
  check_interval = "@every 10s"
}

job "echo" {
  get "cron" "my_cron" {
    trigger = true
  }
  task "echo" {
    run "exec" {
      path = "echo"
      args = ["hello from PikoCI"]
    }
  }
}

Save as pipeline.hcl and start the server with the command above.

Add users

The default user is admin / admin123 (created by the initial database migration). Use --users to add new users or change existing passwords:

# Generate a hashed password
./pikoci user-password -u myuser -p mypassword
# Output: myuser:$2a$10$...

# Pass it to the server (also works to update the default admin password)
./pikoci server --jwt-secret my-secret --users 'myuser:$2a$10$...'

Try with Docker Compose

The examples/ folder contains ready-to-run pipelines. The fastest way to try PikoCI:

cd examples
docker compose up

Open http://localhost:8080 and log in with admin / admin123. The hello-world pipeline runs automatically every 10 seconds.

Next steps