Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.

The plugin delivers an API that makes it possible to easily provide pretested integration functionality for arbitrary scm tools which is capable of using branches or a similar technology.

This Plugin was originally intended to be a core plugin used by other plugins to support the branchy approach of pretested integration, but has of version 2.0 be switch to be THE plugin for all SCm tools. Right now supporting Git.This plugin is developed by the josra.org organisation.

Find this plugin useful? Support further development with BTC 1PTthwWx4AaNLCLNNsJ8gDxhWoaQz1n64B

Setting up pretested integration with Mercurial

Development workflow

The workflow is adapted from the personal branch version of the branchy approach described in https://wiki.jenkins-ci.org/display/JENKINS/Designing+pre-tested+commit.

1. A named branch is used as the team integration branch (defaults to 'default'). 

2. The developer checks out a feature branch based on the integration branch and commits her changes. (hg update -C default && hg branch feature-branch)

3. Every team member has a designated staging branch (also a named branch) unto where she merges the changes and pushes this branch. (hg update stage-branch && merge feature-branch && hg commit -m "Finished development of feature")

4. Jenkins looks for changes on the stage branch, and integrates verified changes in the integration branch and pushes the updated branch.

Jenkins setup

For each staging branch, a Jenkins job is configured to poll for changes and trigger a build. A build is created for every found commit, and is sequentially merged into the integration branch if the commit is verified. 

Subsequent jobs should be configured by listening on the integration branch and commense further tests, deployment etc.

Job configuration

1. Under "Source Code Management" select Mercurial. For "Repository URL" use the repository url. Type in the name of the staging branch into "Branch". Image Removed

2. Under Build Environment, check "Use pretested integration"

3. Select Mercurial and type in the name of the integration branch into "Integration branch". Image Removed

...

Job configuration

We have strive to achieve a one click install of this plugin. so after the plugin is installed simply go to the job, and select Pretested Integration, every thing else is default as seen below on the picture.

Image Added

For further info please read our blog post at josra.org/PretestedIntegration

Currently known issues

* Only builds with Result.STABLE is committed.

...