/meta-shift-plugin

The meta-shift plugin for Jenkins

Primary LanguageJavaMIT LicenseMIT

The meta-shift plugin for Jenkins

About

A plugin for Jenkins to capture and visualize various software quality metrics for Yocto based projects using the reports generated by the meta-shift layer.

The list of software quality metric:

  • Lines of code
  • Premirror cache
  • Shared state cache
  • Bitbake script violations
  • Comments
  • Static analysis
  • Complexity
  • Duplications
  • Unit test
  • Code coverage
  • Mutation test

You may find more information about the meta-shift layer on https://github.com/shift-left-test/meta-shift

Getting started

Configuration

The meta-shift plugin is configured at the job level by adding a meta-shift report post build action. The configuration parameters include:

  • Report Root Path: Specify the path to meta-shift report files in the Ant glob syntax, such as **/build/test-reports/*.xml.
  • Unstable: If this option is checked, then the plugin marks the build status as unstable if the value of the metric does not satisfy the threshold.
  • Threshold: The threshold represent the minimum value which the metric is required to be qualified

You may also configure the parameters on the Jenkins system configuration panel, which are globally available in the whole pipeline by default.

Development

Requirements

  • Maven (3 or above)
  • Java development kit (9 or above)

How to build the plugin

$ mvn package

How to test

$ mvn verify

How to run locally (invokes a local Jenkins instance with the plugin installed)

$ mvn hpi:run -Dhost=0.0.0.0 -Djetty.port=12345

How to run webpack-dev-server

$ cd src/main/frontend
$ ./node/npm run serve

License

This project source code is available under MIT license. See LICENSE.