CI/CD Pipelines

GAGOS provides two CI/CD execution modes: Kubernetes Pipelines and SSH Freestyle Jobs.

Overview

Feature Pipelines Freestyle Jobs
Execution Kubernetes Pods SSH to remote hosts
Configuration YAML files UI-based
Use Case Container builds, testing Server deployments

Kubernetes Pipelines

Pipeline YAML Structure

apiVersion: gagos.io/v1
kind: Pipeline
metadata:
  name: my-pipeline
  description: Build and test

spec:
  variables:
    APP_ENV: production

  triggers:
    - type: webhook
      enabled: true
    - type: cron
      schedule: "0 0 * * *"

  jobs:
    - name: build
      image: golang:1.21
      script: |
        go build -o app ./cmd/...

    - name: test
      image: golang:1.21
      dependsOn: [build]
      script: |
        go test ./...

  artifacts:
    - name: binary
      path: /workspace/app

Creating a Pipeline

  1. Open CI/CD window
  2. Go to "Create Pipeline" tab
  3. Enter YAML or click "Load Sample"
  4. Click "Create Pipeline"

Running a Pipeline

  1. Go to "Pipelines" tab
  2. Click play button on pipeline row
  3. Optionally override variables
  4. Click "Run"

Freestyle Jobs

Creating a Freestyle Job

  1. First, add SSH hosts in "SSH Hosts" tab
  2. Go to "Freestyle Jobs" tab
  3. Click "Create Job"
  4. Add build steps
  5. Save and run

Build Step Types

SSH Host Management

  1. Go to "SSH Hosts" tab
  2. Click "Add Host"
  3. Enter connection details
  4. Choose auth method (password or key)
  5. Test connection
  6. Save

Webhooks

Trigger pipelines from external systems:

curl -X POST "https://gagos.example.com/api/v1/cicd/webhooks/{pipelineId}/{token}" \
  -H "Content-Type: application/json" \
  -d '{"branch": "main"}'

Artifacts

Collect files from pipeline jobs:

  1. Define artifacts in pipeline YAML
  2. After run completes, go to "Artifacts" tab
  3. Download collected files

Notifications

Get notified on build events via webhooks to Slack, Discord, or custom endpoints.