Use when configuring Jenkins in KubeSphere DevOps, including agent customization, LDAP/OIDC integration, build artifact retrieval, or troubleshooting Jenkins issues
Install
The skill file stays in the publisher's repository.
Paste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add kubesphere/kubesphere --skill kubesphere-devops-jenkins -a cursor -y
Download skills/kubesphere-devops-jenkins/SKILL.md from the publisher, or copy the path and open the repository. PlugMCP lists the skill and does not host the file.
Where does kubesphere-devops-jenkins live?
The publisher keeps it at https://github.com/kubesphere/kubesphere.
Which agents can use kubesphere-devops-jenkins?
Claude, Cursor, and Codex can read a SKILL.md you add from the publisher's repository.
Use when configuring Jenkins in KubeSphere DevOps, including agent customization, LDAP/OIDC integration, build artifact retrieval, or troubleshooting Jenkins issues
name: kubesphere-devops-jenkins
description: Use when configuring Jenkins in KubeSphere DevOps, including agent customization, LDAP/OIDC integration, build artifact retrieval, or troubleshooting Jenkins issues
KubeSphere DevOps Jenkins Configuration
Overview
KubeSphere DevOps embeds Jenkins as the CI engine. Jenkins is configured via Configuration as Code (CasC) and provides the underlying pipeline execution environment. Understanding Jenkins configuration is essential for customizing agents, authentication, and resource management.
When to Use
Accessing Jenkins console directly
Configuring LDAP or OIDC authentication
Customizing Jenkins agent images
Configuring GitLab or other SCM servers
Troubleshooting Jenkins startup issues
Updating Jenkins after DevOps upgrade
Triggering builds via API
Downloading build artifacts
Viewing build logs and status
Accessing Jenkins Console
Get Admin Credentials
# Get Jenkins admin user and password
kubectl -n kubesphere-devops-system get secret devops-jenkins -o yaml
# Decode values
echo "<jenkins-admin-password-base64>" | base64 -d
echo "<jenkins-admin-user-base64>" | base64 -d
Get Jenkins NodePort
kubectl -n kubesphere-devops-system get svc devops-jenkins
# Default NodePort: 30180
Access via: http://<master-node-ip>:30180
Configuration As Code (CasC)
Jenkins configuration is managed through the jenkins-casc-config ConfigMap:
# View current CasC
kubectl -n kubesphere-devops-system get cm jenkins-casc-config -o yaml
Action Required: Update pipeline scripts if they depend on these plugins.
Working with Builds via API
Trigger a Pipeline Build
# Get Jenkins admin token
TOKEN=$(kubectl -n kubesphere-devops-system get secret devops-jenkins -o jsonpath='{.data.jenkins-admin-token}' | base64 -d)
# Trigger build for a pipeline
kubectl run curl-trigger --rm -i --restart=Never --image=curlimages/curl \
-- "http://admin:${TOKEN}@devops-jenkins.kubesphere-devops-system:80/job/demo-project/job/my-pipeline/build" \
-X POST -w "\nHTTP Status: %{http_code}\n"
# Expected: HTTP Status: 201 (Created)
Multi-branch Pipeline:
# Trigger specific branch build
kubectl run curl-trigger-branch --rm -i --restart=Never --image=curlimages/curl \
-- "http://admin:${TOKEN}@devops-jenkins.kubesphere-devops-system:80/job/demo-project/job/my-multibranch/job/main/build" \
-X POST
View Build Console Log
# Get console log for build #3
kubectl run curl-log --rm -i --restart=Never --image=curlimages/curl \
-- "http://admin:${TOKEN}@devops-jenkins.kubesphere-devops-system:80/job/demo-project/job/my-pipeline/job/main/3/consoleText"
Check Build Status
# Get build info as JSON
kubectl run curl-status --rm -i --restart=Never --image=curlimages/curl \
-- "http://admin:${TOKEN}@devops-jenkins.kubesphere-devops-system:80/job/demo-project/job/my-pipeline/job/main/3/api/json" \
| grep -E '"result"|"building"|"duration"'
# Example output:
# "building":false
# "duration":53917
# "result":"SUCCESS"
Download Build Artifacts
Method: Pod-based Download (Recommended for Binaries)
For binary artifacts, use a pod to download and then copy out:
# 1. Create a download pod
kubectl apply -f - <<EOF
apiVersion: v1
kind: Pod
metadata:
name: artifact-downloader
spec:
containers:
- name: downloader
image: curlimages/curl
command: ['sh', '-c', 'sleep 300']
EOF
# 2. Wait for pod ready
kubectl wait --for=condition=Ready pod/artifact-downloader --timeout=60s
# 3. Get Jenkins token and download artifact
TOKEN=$(kubectl -n kubesphere-devops-system get secret devops-jenkins -o jsonpath='{.data.jenkins-admin-token}' | base64 -d)
kubectl exec artifact-downloader -- sh -c \
"curl -s -o /tmp/service 'http://admin:${TOKEN}@devops-jenkins.kubesphere-devops-system:80/job/demo-project/job/my-pipeline/job/main/3/artifact/service'"
# 4. Copy artifact from pod to local
kubectl cp artifact-downloader:/tmp/service /tmp/service
# 5. Clean up
kubectl delete pod artifact-downloader --force
Verify Downloaded Artifact:
# Check file
ls -lh /tmp/service
file /tmp/service
# Example output:
# /tmp/service: ELF 64-bit LSB executable, x86-64...
# Make executable and test
chmod +x /tmp/service
/tmp/service --help
Working with PipelineRuns
PipelineRuns track Jenkins build execution in Kubernetes:
# List recent pipeline runs
kubectl get pipelineruns -n <devops-project-namespace> --sort-by=.metadata.creationTimestamp
# Example output:
# NAME COMPLETIONS STATUS AGE
# my-pipeline-vf8p5 1 Succeeded 2m
# Get detailed status
kubectl get pipelinerun my-pipeline-vf8p5 -n demo-project -o yaml
Download skills/kubesphere-devops-jenkins/SKILL.md from the publisher, or copy the path and open the repository. PlugMCP lists the skill and does not host the file.
Where does kubesphere-devops-jenkins live?
The publisher keeps it at https://github.com/kubesphere/kubesphere.
Which agents can use kubesphere-devops-jenkins?
Claude, Cursor, and Codex can read a SKILL.md you add from the publisher's repository.