{jenkins-plugin-info:pluginId=pretested-integration|jiraComponent=pretested-integration}

Developed by

Sponsored by

Introduction

The Pretested Integration Plugin offers a branchy approach to pretested integration (also known as pre-tested commits), which upholds the invariant; that for a specific branch, known as the integration branch, all commits have been verified.


This plugin is developed by Praqma and sponsored by Atmel - It's maintained in the scope of Joint Open Source Roadmap Alliance (JOSRA).

The plugin rely on the SCM plugin to establish the workspace and then takes over to do the integration. Last the job make the decision whether to like and commit the result or hate and discard it. To get a comprehensive introduction to how the plugin relies on the SCM plugin please read the blog post at the JOSRA: Pretested Integration Plugin.

References

The recommend setup and git workflow

Here is a simple git workflow where you can work on a features branch, and when ready push to a ready-branch. The Pretested Integration plugin, if configured as described will then pick up your changes, merge them and verify them. If verified they are integrated on the integration branch. The ready branch are automatically deleted if integration was successful.

Recommendation:

The simple plugin configuration

To configure the plugin to pick up ready branches, verify them and deliver them to the integration branch use the following configuration:


Configure the SCM as above.

  • Recommend ready branch specifier is the 'Branch Speciifier' : ready/**
  • Remember to add the two additional behaviours to ensure a clean work space and that old deleted branches are cleaned
  • It is recommended to name your repository in the 'Name' field.


Configure the Pretested Integration plugin with integration branch 'master' and the named repository 'origin'.
There is a Pretested Integration plugin post-build step, which ensure verified changes are published. You don't have to configure it - it is automatically added.

Now you only need to configure your definition of done - the verification. How should the job verify the commits? It can be compile and measure compiler warning, build and run unit tests and check that coverage do not drop.

The simple Git workflow

Get your repository up to date:

git fetch --prune

git checkout master

git pull origin master

Create a feature- or development- or... branch

git checkout -b feat_1337-improved-login-screen

...work, stage and commit changes.

Then push changes to a ready branch, which is basically just a branch following a naming conventions for branches matching ready/**.

git push origin feat_1337-improved-login-screen:ready/feat_1337-improved-login-screen

The change will be picked up by the plugin if configured as shown in next section.

Help and error messages

We have gathered some common errors and problems seen, together with some suggested solutions - Help and error messages

Using multiple repository configurations

The plugin can be used in jobs with multiple repositories configured in the jobs, but there can be only one integration repository. The plugin is designed to work on only one repository, you can integrate on several repositories a once.

Recommendations for multiple repository jobs

More info will come with release 2.2.0....

Using with Git SCM plugin

More info will come with release 2.2.0....

Using with MultiSCM plugin

More info will come with release 2.2.0....

Acknowledgement

Code contributions were initially made by Computer Science students at University of Copenhagen as part of a study project

Ronni Elken Lindsgaard
Alexander Winther Uldall
Esben Skaarup
Andreas Frisch

Issues

Changes

Version 2.1.2:
Version 2.1.1:
Version 2.1.0:
Version 2.0:
Version 1.1:
Version 1.0: