Summary
Add Jenkins as a supported DevOps tool in the CLI. Jenkins is the most popular CI/CD server (~44% market share), providing deployment frequency and build data for DORA metrics.
Upstream Plugin
jenkins in incubator-devlake/backend/plugins/jenkins/
| Property |
Value |
| Plugin slug |
jenkins |
| Auth |
BasicAuth only (username + password/API token) |
| Scope type |
Jobs (FullName string, path-based) |
| Scope ID field |
fullName |
| Default endpoint |
User-provided Jenkins server URL |
| Remote-scope API |
Yes |
| Connection test |
Yes |
Dependencies
Blocked by:
Changes
- Add
ConnectionDef for jenkins in connectionRegistry:
AuthMethod: "BasicAuth"
NeedsUsername: true
UsernamePrompt: "Jenkins username"
UsernameEnvVars: []string{"JENKINS_USER", "JENKINS_USERNAME"}
Endpoint: "" (user must provide)
SupportsTest: true
TokenPrompt: "Jenkins API token or password"
EnvVarNames: []string{"JENKINS_TOKEN", "JENKINS_PASSWORD"}
EnvFileKeys: []string{"JENKINS_TOKEN", "JENKINS_PASSWORD"}
ScopeIDField: "fullName"
ScopeFunc: scopeJenkinsHandler
- Implement
scopeJenkinsHandler:
- Use
client.ListRemoteScopes("jenkins", connID, "", "") to browse job tree
- Let user select jobs interactively or via
--jobs flag
- PUT selected jobs as scopes
- Set
Available: true
Acceptance Criteria
Summary
Add Jenkins as a supported DevOps tool in the CLI. Jenkins is the most popular CI/CD server (~44% market share), providing deployment frequency and build data for DORA metrics.
Upstream Plugin
jenkinsinincubator-devlake/backend/plugins/jenkins/jenkinsFullNamestring, path-based)fullNameDependencies
Blocked by:
fullNameis string, needsScopeIDField)Changes
ConnectionDefforjenkinsinconnectionRegistry:AuthMethod: "BasicAuth"NeedsUsername: trueUsernamePrompt: "Jenkins username"UsernameEnvVars: []string{"JENKINS_USER", "JENKINS_USERNAME"}Endpoint: ""(user must provide)SupportsTest: trueTokenPrompt: "Jenkins API token or password"EnvVarNames: []string{"JENKINS_TOKEN", "JENKINS_PASSWORD"}EnvFileKeys: []string{"JENKINS_TOKEN", "JENKINS_PASSWORD"}ScopeIDField: "fullName"ScopeFunc: scopeJenkinsHandlerscopeJenkinsHandler:client.ListRemoteScopes("jenkins", connID, "", "")to browse job tree--jobsflagAvailable: trueAcceptance Criteria
gh devlake configure connection add --plugin jenkins --username admin --endpoint https://jenkins.example.comcreates a Jenkins connectiongo build ./...,go test ./...,go vet ./...pass