Interact with Jenkins jobs, builds, and pipelines directly in GitHub Copilot chat using natural language.
Features
- 📋 Query Jenkins jobs and their status
- 🚀 Get build information and console logs
- ⏳ Monitor build queue
- 🖥️ Check Jenkins nodes/agents status
- 👁️ Browse Jenkins views
- 🔐 Automatic CSRF crumb handling
Installation
- Install the extension from VS Code Marketplace
- Configure your Jenkins credentials in VS Code settings or environment variables
Configuration
VS Code Settings
Open VS Code settings and configure:
- Jenkins URL: Your Jenkins server URL (e.g.,
https://jenkins.example.com)
- Jenkins Username: Your Jenkins username
- Jenkins API Token: Your Jenkins API token (generated from User Configuration → API Token)
Environment Variables
Alternatively, create a .env file in your workspace:
JENKINS_URL=https://jenkins.example.com
JENKINS_USERNAME=your-username
JENKINS_API_TOKEN=your-api-token
Usage
Once configured, you can use natural language in GitHub Copilot chat:
- "Show me all Jenkins jobs"
- "Get the status of the main-build job"
- "Show me the last build for my-project"
- "Get the console log for build #42 of api-tests"
- "What's in the Jenkins build queue?"
- "Show me all Jenkins nodes and their status"
Job Operations
- getJenkinsJob: Get details for a specific job
- getJenkinsJobs: List all jobs
Build Operations
- getJenkinsBuild: Get specific build details
- getJenkinsLastBuild: Get the most recent build
- getJenkinsBuildLog: Get console output for a build
- triggerJenkinsBuild: Start a new build (write operation)
- triggerJenkinsBuildWithParameters: Start a parameterized build (write operation)
- stopJenkinsBuild: Stop a running build (write operation)
Queue Operations
- getJenkinsQueue: Get builds waiting in queue
- cancelJenkinsQueueItem: Cancel a queued build (write operation)
Node Operations
- getJenkinsNode: Get details for a specific agent/node
- getJenkinsNodes: List all agents/nodes
View Operations
- getJenkinsView: Get details for a specific view
- getJenkinsViews: List all views
Utility
- getJenkinsCrumb: Get CSRF protection crumb
Testing
Run the test scripts to verify your configuration:
# Test connectivity
npm run verify
# Test all read operations
npm run test
# Test with a specific job
npm run test -- my-job-name
API Reference
This extension implements Jenkins Remote Access API:
Requirements
- VS Code 1.95.0 or higher
- GitHub Copilot subscription
- Jenkins server with API access enabled
Security Notes
- Store your API token securely in VS Code settings (not in source control)
- Use
.env for local development only
- API tokens can be revoked at any time from Jenkins User Configuration
- CSRF protection (crumb) is automatically handled for POST requests
License
MIT
Contributing
Contributions are welcome! Please feel free to submit issues or pull requests.
Support
For issues and questions: