kubesphere-devops-pipeline
できること
このスキルは、パイプラインの背後にあるKubernetesのオブジェクトを通じて、KubeSphere DevOpsのパイプラインを管理するよう、AIエージェントを支援します。パイプラインを作って動かす開発者や運用者向けです。
使う場面
- ✓プロジェクトのCI/CDパイプラインを作成または更新したいとき。
- ✓パイプラインの実行を開始し、終わったかどうかを確認したいとき。
- ✓パイプラインの実行が失敗し、そのログと成果物を確認したいとき。
スキルのリンク
https://github.com/kubesphere/kubesphere/blob/master/skills/kubesphere-devops-pipeline/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私たちのAPIプロジェクトのビルドパイプラインを開始してください。実行が成功したかどうか教えてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、実行を始める前にパイプラインがパラメーターを必要とするか確認します。その後、パイプラインのオブジェクトを作成または更新し、実行を見守り、必要に応じてログと成果物を読みます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
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.parametersarray For Regular Pipelines: Query the Pipeline CR and check.spec.pipeline.jenkinsfileforparameters {}directive
Preferred Approach: Create a PipelineRun custom resource. KubeSphere watches for these resources and triggers the corresponding Jenkins build.
Create a PipelineRun
apiVersion: devops.kubesphere.io/v1alpha3
kind: PipelineRun
metadata:
name: my-pipeline-run-001
namespace: demo-project
spec:
pipelineRef:
name: my-pipeline
parameters:
- name: BRANCH
value: "main"
Apply with kubectl:
kubectl apply -f pipelinerun.yaml
Check PipelineRun Status
# List all runs
kubectl get pipelineruns -n demo-project
# Get specific run status
kubectl get pipelinerun my-pipeline-run-001 -n demo-project -o yaml
# Watch run progress
kubectl get pipelineruns -n demo-project -w
PipelineRun Status Fields
| Field | Description |
|---|---|
status.phase |
Current state (Pending, Running, Succeeded, Failed, Unknown) |
status.conditions |
Detailed conditions (Succeeded, Ready) |
status.completionTime |
When run finished |
status.startTime |
When run started |
Delete a PipelineRun
kubectl delete pipelinerun my-pipeline-run-001 -n demo-project
Working Pipeline Example
Here's a complete, working pipeline that builds a Go application:
apiVersion: devops.kubesphere.io/v1alpha3
kind: Pipeline
metadata:
name: go-demo-pipeline
namespace: demo-project
spec:
type: pipeline
pipeline:
name: go-demo-pipeline
description: "Build and test Go application"
jenkinsfile: |
pipeline {
agent any
stages {
stage('Build, Test and Archive') {
agent {
kubernetes {
yaml '''
apiVersion: v1
kind: Pod
spec:
containers:
- name: golang
image: golang:1.21
command: ["sleep"]
args: ["99d"]
'''
}
}
steps {
container('golang') {
sh '''
export GO111MODULE=on
git clone https://github.com/kubesphere-sigs/demo-go-http.git .
go mod download
go test ./... -v
go build -o service main.go
'''
}
archiveArtifacts artifacts: 'service', followSymlinks: false
}
}
}
}
Key Points:
- Uses
agent { kubernetes { yaml ... } }to define a custom pod with Go container - The
archiveArtifactsstep must be in the same stage as the build (same workspace) - Container name in
container('golang')must match the container name in the YAML
Pipelin
よくある質問
エージェントは最初にパイプラインのパラメーターを確認しますか?
はい。このスキルは、どのパイプラインを起動する前にも、パラメーターを確認するよう述べています。
エージェントはパイプラインの状態をどこで読みますか?
Kubernetesのパイプラインと実行のオブジェクトを読みます。それらは背後のJenkinsジョブに対応しています。
失敗した実行を調べる手伝いもしてくれますか?
はい。パイプラインのログの読み取りと、失敗した実行のトラブルシューティングを扱っています。
詳細
作者による元の説明
Use when creating, running, or managing CI/CD pipelines in KubeSphere DevOps, including pipeline API operations and run monitoring
repo: kubesphere/kubesphere
人気
- GitHubのスター
- 17k
- ランキング
- #10771
- ライセンス
- —
- 更新日
- 2026/7/14
コメント
- …
このリポジトリの他のスキル
frontend-forge-fe-operations
17kエージェントが、KubeSphereでFrontendExtensionリソースを管理し、ビルド、公開、デバッグを行えるよう支援します。
frontend-forge-fi-operations
17kエージェントが、KubeSphereでFrontendIntegrationリソースとfrontend-forge拡張機能を作成、更新、有効化、無効化、確認できるよう支援します。
frontend-integration-yaml
17kエージェントが、一つのメニューと一つ以上のページについて、そのまま提出できるFrontendIntegrationのYAMLを作成できるよう支援します。
kubeeye
17kエージェントが、KubeEyeをインストールし、クラスターの点検ルールと計画を設定して、点検レポートを読めるよう支援します。
似ているスキル
openclaw-update
394k既存のOpenClaw Gatewayを更新するようエージェントを支援します。インストール方法に合った更新方法を選び、セッションを動かし続けます。
diagnose-gateway
394k設定、チャンネル、ポートを確認して、OpenClaw Gatewayが失敗している理由を、何も変更せずに突き止めるようエージェントを支援します。
crabbox-apps
394k一時的なクラウドマシン上でアプリを開いて実行し、そのビューをチャットのサイドパネルに表示するようエージェントを支援します。