# Kubesphere Devops Pipeline

Use when creating, running, or managing CI/CD pipelines in KubeSphere DevOps, including...

- Repository: https://github.com/kubesphere/kubesphere (17074 stars)
- Category: DevOps
- License: see repository
- Last updated: 2026-07-15
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add kubesphere/kubesphere --skill kubesphere-devops-pipeline -g -a claude-code -y`
Codex: `npx skills add kubesphere/kubesphere --skill kubesphere-devops-pipeline -g -a codex -y`
Cursor: `npx skills add kubesphere/kubesphere --skill kubesphere-devops-pipeline -g -a cursor -y`
Gemini CLI: `npx skills add kubesphere/kubesphere --skill kubesphere-devops-pipeline -g -a gemini-cli -y`

## Description

Use when creating, running, or managing CI/CD pipelines in KubeSphere DevOps, including pipeline API operations and run monitoring

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# KubeSphere DevOps Pipeline Management

## Overview

Pipelines in KubeSphere DevOps are Kubernetes custom resources that integrate with Jenkins. KubeSphere uses a cloud-native, object-reconcile approach where Kubernetes resources are the source of truth.

## When to Use

- Creating or updating CI/CD pipelines
- Triggering pipeline runs
- Monitoring pipeline execution
- Retrieving pipeline logs and artifacts
- Troubleshooting failed pipeline runs

## Architecture Mapping

KubeSphere DevOps maps Kubernetes resources to Jenkins objects:

| KubeSphere Resource | K8s Resource | Jenkins Resource |
|---------------------|--------------|------------------|
| DevOpsProject | DevOpsProject CR + Namespace | Folder |
| Pipeline | Pipeline CR | WorkflowJob |
| PipelineRun | PipelineRun CR | Build Run |
| Workspace | Workspace CR | (authorization context) |

```
KubeSphere          Kubernetes                Jenkins
─────────────────────────────────────────────────────────────
Workspace demo
└── DevOpsProject   → demo-project NS          → Folder demo-project
    └── Pipeline    → Pipeline CR              → WorkflowJob
        └── Run     → PipelineRun CR           → Build #1
```

## Triggering Pipeline Runs (Recommended: Object-Reconcile)

> **CRITICAL: ALWAYS Check for Parameters First!**
> 
> Before triggering ANY pipeline (regular or multi-branch), you MUST check if the pipeline has parameters defined.
> Triggering a pipeline without required parameters will cause the build to fail or use incorrect defaults.
> 
> **For Multi-Branch Pipelines:** Query `/branches/{branch}` endpoint to get `.parameters` array
> **For Regular Pipelines:** Query the Pipeline CR and check `.spec.pipeline.jenkinsfile` for `parameters {}` directive

**Preferred Approach:** Create a `PipelineRun` custom resource. KubeSphere watches for these resources and triggers the corresponding Jenkins build.

### Create a PipelineRun

The rest: https://github.com/kubesphere/kubesphere/blob/HEAD/skills/kubesphere-devops-pipeline/SKILL.md
