DOC_INDEX
THEME
DOCS/Migrating to OrchStep/From Jenkins, GoCD and other CI servers

From Jenkins, GoCD and other CI servers

Move pipeline logic out of Jenkinsfiles, GoCD pipelines and CI YAML into one orchstep.yml that runs the same on a laptop, in any CI server, and from an AI agent.

Most pipelines are written in the CI server's own language: a Groovy Jenkinsfile, a GoCD pipeline definition, GitHub Actions or GitLab YAML. That works until you want to run a step on your laptop, debug a failed deploy, share the same release process across 30 repositories, or move to a different CI system. Then you find the logic is locked into the tool that triggers it.

OrchStep splits the two jobs apart:

  • The CI server keeps what it is good at: triggers, build agents, the credential store, artifacts, approvals and the audit log.
  • The pipeline itself moves into orchstep.yml: the steps, the per-environment values, retries, rollbacks and checks. The CI job becomes a one-line call.
Jenkinsfile stage   ->   sh 'orchstep run deploy --env staging'
GoCD job task       ->   exec: orchstep run deploy --env staging
GitHub Actions step ->   - run: orchstep run deploy --env staging
Your laptop         ->   orchstep run deploy --env staging
An AI agent         ->   orchstep_run { task: "deploy", environment: "staging" }  (MCP)

The pipeline, once

name: shop-api
desc: Build, test and deploy the shop API

defaults:
  app: shop-api
  version: dev
  replicas: "1"

environments:
  staging:
    vars:
      cluster: staging-eu
      replicas: "2"
  production:
    vars:
      cluster: prod-eu
      replicas: "6"

tasks:
  ci:
    desc: Build and test (every push)
    steps:
      - name: checks
        parallel:
          - name: unit
            func: shell
            do: go test ./...
          - name: lint
            func: shell
            do: golangci-lint run
      - name: build
        func: shell
        do: docker build -t {{ vars.app }}:{{ vars.version }} .

  deploy:
    desc: Deploy a built version to an environment
    steps:
      - name: rollout
        func: shell
        do: kubectl --context {{ vars.cluster }} set image deploy/{{ vars.app }} app={{ vars.app }}:{{ vars.version }}
        retry:
          max_attempts: 3
          interval: 5s
          backoff_rate: 2.0
        catch:
          - name: rollback
            func: shell
            do: kubectl --context {{ vars.cluster }} rollout undo deploy/{{ vars.app }}
      - name: smoke
        func: shell
        do: curl -fsS https://{{ vars.cluster }}.example.com/health

Before anything runs, you can check it:

orchstep validate deploy                                       # which env is missing which variable
orchstep run deploy --env production --var version=1.4.2 --dry-run   # every rendered command, no execution

Jenkins

pipeline {
  agent any
  stages {
    stage('CI') {
      steps { sh 'orchstep run ci --var version=$BUILD_NUMBER' }
    }
    stage('Deploy staging') {
      steps { sh 'orchstep run deploy --env staging --var version=$BUILD_NUMBER' }
    }
    stage('Deploy production') {
      input { message 'Deploy to production?' }
      steps { sh 'orchstep run deploy --env production --var version=$BUILD_NUMBER' }
    }
  }
}

Jenkins still owns the agents, credentials (withCredentials) and the approval gate. The Groovy drops from hundreds of lines to a few, and the pipeline logic no longer needs a Jenkins instance to test.

GoCD

format_version: 10
pipelines:
  shop-api:
    group: shop
    materials:
      repo:
        git: https://github.com/acme/shop-api.git
    stages:
      - ci:
          jobs:
            build:
              tasks:
                - exec:
                    command: orchstep
                    arguments: [run, ci, --var, "version=${GO_PIPELINE_LABEL}"]
      - deploy-staging:
          jobs:
            deploy:
              tasks:
                - exec:
                    command: orchstep
                    arguments: [run, deploy, --env, staging, --var, "version=${GO_PIPELINE_LABEL}"]
      - deploy-production:
          approval:
            type: manual
          jobs:
            deploy:
              tasks:
                - exec:
                    command: orchstep
                    arguments: [run, deploy, --env, production, --var, "version=${GO_PIPELINE_LABEL}"]

GoCD keeps value-stream mapping, fan-in and manual approvals; each job is one orchstep run.

Everything else

CI systemThe whole job
GitHub Actionsuses: orchstep/run-orchstep@v1 with task: deploy (details)
GitLab CIscript: [orchstep run deploy --env staging]
Buildkitecommand: orchstep run deploy --env staging
CircleCI- run: orchstep run deploy --env staging
Azure Pipelines- script: orchstep run deploy --env staging
Bitbucket Pipelinesscript: [orchstep run deploy --env staging]
Tekton, Argo Workflows, Kubernetes Jobsthe orchstep/orchstep container image

Install with curl -fsSL https://orchstep.dev/install.sh | sh, or use the container image. It is a single static binary for Linux, macOS and Windows.

What you gain

  • Runs anywhere, identically. The same command works on a laptop, on any CI server and in a container, so "it only fails in CI" becomes orchstep run deploy --env staging on your machine.
  • Switching CI is a small edit. Moving from Jenkins to GitHub Actions means rewriting a few trigger lines, not the pipeline.
  • Shared across the team. Package the release or deploy process as a module with versions and a lockfile, and every repository uses the same tested steps instead of copy-pasted Groovy.
  • Developers don't need to be CI experts. They run named tasks (orchstep menu lists them); the people who own the process maintain it in one place.
  • Safer changes. --dry-run shows every rendered command and branch decision, and orchstep validate catches a variable missing from production before the deploy, not during it.
  • A UI when you want one. orchstep serve gives a local web console with run history, live step graphs and logs.
  • Agents can use it too. An AI coding agent can list, preview and run the same tasks through the MCP server instead of improvising shell commands.

What stays in the CI server

OrchStep is a workflow runner, not a CI server. It doesn't watch repositories, schedule builds, manage a pool of build machines or store artifacts. Keep your CI system for those, and keep secrets in its credential store (pass them to OrchStep as environment variables). Small teams that only need "run this on push" often find that GitHub Actions plus OrchStep covers everything they used a dedicated CI server for.