Skip to content
This repository has been archived by the owner on Dec 8, 2020. It is now read-only.

empear-analytics/codescene-jenkins-plugin

Repository files navigation

THIS REPOSITORY HAS BEEN DEPRECATED: please use https://github.com/jenkinsci/codescene-plugin

codescene-jenkins-plugin

Build Status Latest release

A jenkins plugin for CodeScene by Empear.

CodeScene detects potential maintenance problems and early warnings in your codebase. The earlier you can react to those findings, the better. That’s why CodeScene offers integration points that let you incorporate the analysis results into your build pipeline.

This plugin lets you use CodeScene’s Delta Analysis to catch potential problems before they are delivered to your main branch.

Screenshot

In addition to the risk classification, CodeScene also runs its set of early warning analyses:

EarlyWarning

The early warnings and risk classification let you prioritize your code reviews and focus your time where (and when) it’s likely to be needed the most. Code reviewer fatigue is a real thing, so let’s use our review efforts wisely.

Installation

This plugin can be downloaded as an .hpi file from one the published releases. Then, in the Jenkins configuration UI for plugins, upload the .hpi file to install it.

Configure Jenkins for CodeScene

Enable the CodeScene integration by adding a new build step in your Jenkins configuration. Select the option Run CodeScene Delta Analysis.

Add Buildstep

Enter the required information in the CodeScene Jenkins configuration:

Buildstep

CodeScene gives you a number of options that controls the scope of the delta analysis:

  • Individual Commits: Check this option to run a delta analysis on each individual commit. When in doubt, make this your default setting.
  • By Branch: With this option, CodeScene runs a delta analysis on the difference between the branch you build and the one you provide as reference. Use this option if you want to analyse a whole pull request.

You can also change the defaults for risk threshold and temporal coupling threshold

  • Risk Threshold: commits with risk equal or higher than this value will make a build unstable
  • Temporal Coupling Threshold: minimum temporal coupling for "Absence of Expected Change Pattern" warning

The CodeScene API configuration section has to match the information specified inside CodeScene itself and retrievable from the analysis configuration.

API Credentials should be added via jenkins credentials plugin. Check Injecting Secrets into Jenkins Build Jobs for more details.

Changelog

Contributing

You're encouraged to submit pull requests, and to propose features and discuss issues.

License

Licensed under the MIT License.