Skip to content

lightning1377/jenkins-client

Repository files navigation

Jenkins Client

Visual Studio Marketplace Installs

Jenkins Client brings Jenkins build status, recent builds, and Pipeline stages into VS Code. It watches the current Git branch, matches the pushed commit against recent Jenkins builds, and gives you quick actions for opening the job, build, console output, or Pipeline details.

Jenkins Client icon

Highlights

Status bar preview 1

Status bar preview 2

Status bar preview 3

  • Stateful status bar text for passed, failed, unstable, aborted, building, queued, paused, and unknown builds
  • Jenkins activity-bar views for the current build, recent builds, and Pipeline stages
  • Guided setup command that saves the API token in VS Code Secret Storage
  • Build matching across recent builds, including failed, unstable, aborted, in-progress, and never-successful jobs
  • Support for freestyle jobs, Pipeline jobs, folders, and multibranch Pipeline job paths
  • Pipeline details webview when Jenkins exposes the Pipeline REST API plugin
  • Quick actions to refresh, open job/build/console, copy build URL, and open Pipeline details
  • Live settings reload without reloading the VS Code window

Sidebar preview

Requirements

  • VS Code 1.80.0 or newer
  • A Git workspace
  • Access to a Jenkins server
  • A Jenkins username and API token
  • Optional: Jenkins Pipeline REST API plugin for stage visualization

Setup

  1. Run Jenkins: Setup Jenkins Client from the command palette.
  2. Enter the Jenkins URL, username, API token, and default job path.
  3. Optionally enter branch-specific job mappings and ignored branches.
  4. Let the setup command validate Jenkins access and save the workspace settings.

You can still configure the extension manually:

{
    "jenkinsBuildStatus.enabled": true,
    "jenkinsBuildStatus.jenkinsUrl": "https://jenkins.example.com",
    "jenkinsBuildStatus.username": "your-jenkins-user",
    "jenkinsBuildStatus.jobName": "Folder/My Jenkins Job"
}

Then run Jenkins: Set Jenkins API Token.

Multibranch And Branch-Specific Jobs

For a multibranch Pipeline root, set jobName to the root job path. Jenkins Client tries both the configured job and jobName/current-branch when resolving builds.

Use branchSpecificJobs when a branch uses a job outside the default mapping:

{
    "jenkinsBuildStatus.jobName": "Main Build",
    "jenkinsBuildStatus.branchSpecificJobs": {
        "release/1.0": "Release Build",
        "develop": "Develop Build"
    }
}

Use excludeBranches for branches Jenkins does not build:

{
    "jenkinsBuildStatus.excludeBranches": ["docs", "prototype"]
}

Commands

  • Jenkins: Setup Jenkins Client
  • Jenkins: Refresh Jenkins Status
  • Jenkins: Open Jenkins Job
  • Jenkins: Open Jenkins Build
  • Jenkins: Open Jenkins Console Output
  • Jenkins: Open Jenkins Pipeline Details
  • Jenkins: Copy Jenkins Build URL
  • Jenkins: Clear Jenkins Service Cache
  • Jenkins: Set Jenkins API Token
  • Jenkins: Clear Jenkins API Token
  • Jenkins: Show Jenkins Client Output

Settings

  • jenkinsBuildStatus.enabled - enable Jenkins Client for the workspace
  • jenkinsBuildStatus.jenkinsUrl - Jenkins server URL
  • jenkinsBuildStatus.username - Jenkins username
  • jenkinsBuildStatus.jobName - default Jenkins job path
  • jenkinsBuildStatus.branchSpecificJobs - branch-to-job mapping
  • jenkinsBuildStatus.excludeBranches - branches ignored by Jenkins Client
  • jenkinsBuildStatus.remoteName - Git remote used to resolve pushed commits
  • jenkinsBuildStatus.recentBuildLimit - recent builds shown in the sidebar
  • jenkinsBuildStatus.scanBuildLimit - recent builds scanned to match the current commit
  • jenkinsBuildStatus.showStatusBarWhenUnconfigured - show setup status in unconfigured workspaces
  • jenkinsBuildStatus.pipelineDetails.enabled - fetch Pipeline stage details when available

Pipeline Details

Pipeline stage visualization uses Jenkins Pipeline REST API endpoints such as /wfapi/runs and /:run-id/wfapi/describe. If those endpoints are unavailable, Jenkins Client still shows normalized build status and recent builds, and the Pipeline views explain that stage details require the Pipeline REST API plugin.

Development

npm install
npm run compile
npm run lint

To debug the extension, open this folder in VS Code and run the Launch Extension configuration.

Packaging

npm run vsce

The packaged VSIX is written to releases/.

Release Notes

See CHANGELOG.md.

Feedback And Contributing

Found a bug or have a feature request? Open an issue or submit a pull request on the GitHub repository.

About

VS Code extension that shows Jenkins build status for the current Git branch in the status bar.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors