मुख्य सामग्री पर जाएँ
Skillpedia
डिप्लॉय और क्लाउड (DevOps)17k · #10771

kubesphere-devops-pipeline

यह क्या करती है

यह स्किल AI एजेंट को KubeSphere DevOps में pipelines को उनके पीछे के Kubernetes संसाधनों के ज़रिए संभालने में मदद करती है। यह उन डेवलपर्स और ऑपरेटरों के लिए है जो pipelines बनाते और चलाते हैं।

कब इस्तेमाल करें

  • ✓जब आप किसी project के लिए CI/CD pipeline बनाना या अपडेट करना चाहते हैं।
  • ✓जब आपको pipeline run शुरू करना हो और जाँचना हो कि वह पूरा हुआ या नहीं।
  • ✓जब pipeline run फ़ेल हुआ हो और आप उसके logs व artifacts देखना चाहते हैं।

Skill का लिंक

https://github.com/kubesphere/kubesphere/blob/master/skills/kubesphere-devops-pipeline/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/kubesphere/kubesphere/blob/master/skills/kubesphere-devops-pipeline/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“क्या आप हमारे API project की build pipeline शुरू कर सकते हैं और बता सकते हैं कि run सफल होता है या नहीं?”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

एजेंट run शुरू करने से पहले जाँचता है कि pipeline को parameters चाहिए या नहीं। फिर वह pipeline object बनाता या अपडेट करता है, run पर नज़र रखता है और ज़रूरत पर logs व artifacts पढ़ता है।

तकनीकी सामग्री (मूल 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 .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

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 archiveArtifacts step 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

अक्सर पूछे जाने वाले सवाल

क्या एजेंट पहले pipeline parameters की जाँच करता है?

हाँ। स्किल कहती है कि किसी भी pipeline को चलाने से पहले parameters की जाँच करें।

एजेंट pipeline की स्थिति कहाँ से पढ़ता है?

वह Kubernetes में pipeline और run objects पढ़ता है, जो उनके पीछे के Jenkins jobs से मेल खाते हैं।

क्या यह फ़ेल हुए run में मदद कर सकता है?

हाँ। स्किल pipeline logs पढ़ने और फ़ेल runs के समस्या-निवारण को कवर करती है।

जानकारी

लेखक का मूल विवरण

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
लाइसेंस
—
अपडेट की गई
14/7/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills