Page MenuHomeDevCentral

Create modern Jenkins CI pipeline for Obsidian
Open, HighPublic

Description

Once upon a time, the popular Jenkins php-template was used to call every quality assurance tool maintained around PHPUnit and produce nice graphics.

Current work on Obsidian Workspaces is a nice opportunity to think about a modern pipeline.

That pipeline could:

  • run tests with PHPUnit
  • produce coverage report, let's try first phpunit -coverage-html before creating a tool to handle clover format
  • produce API documentation

Things we're not really interested:

  • phpcpd, never yield any result, not maintained
  • phploc, as results aren't meaningful
  • cyclometric complexity SVG graphs, don't bring value

Fun things we can do:

Everything ideally should occur with tools, without Jenkins plugins involved.

Priority set as high, because other PHP projects would benefit from this pipeline.

Event Timeline

dereckson triaged this task as High priority.Fri, Oct 17, 17:11
dereckson created this task.

Some of the plugins from the template can still be used as documented on https://www.jenkins.io/solutions/php/:

HTML publisher plugin

Reports can still be published:

  • code coverage from phpunit or phpunit + clover
  • API documentation from phpdox

https://plugins.jenkins.io/htmlpublisher/

xUnit plugin

This plugin is the one responsible to generate the blue graph of tests results.

Coverage plugin

https://plugins.jenkins.io/coverage/

If we transform to the OpenClover format, we can use this plugin to generate a visualisation of the code coverage too.

But natively, both this plugin and phpunit support the cobertura format.

Next-generation warning plugin

https://plugins.jenkins.io/warnings-ng/

Reports from phpcs, phpstan (but not phan) can be parsed by the a warnings plugin.