Search code examples
gitgithubcontinuous-integrationcruisecontrol.net

How to do continuous integration on feature branches


In our company we use git flow and use continuous integration.

That means:

  • When someone commit on develop, our develop server builds to develop.domain.com
  • When someone commit on master, we build to production

This works great, but not for features.

We often have multiple features, which requires to be tested by the rest of the company.

So I want to say:

"Build /feature/my-feature/ to feature_1.domain.com", so anyone on our interal network can access that feature very easily.

How can you do this?

Possible solutions I could think off

Build own tool:

We're considering to build our own tool that authenticates with Github, and then manually fetches the repo and build solution to a given URL.

That just seems really weird - it seems to hack continuous integration.

Feature toggles:

The most common answer seems to be to use feature toggles, but that doesn't make it easy for other people to test / turn features on/off.

Technologies: Git (GitHub), CruiseControl, Sourcetree, .NET


Solution

  • Just throwing something out there.. Add a ccnet project called BuildToFeature_X. Use ccnet parameters to control what gets built and where. The parameters would be:

    1. FeatureNumber - The domain to post to. You used 1 in your example.
    2. Branch URL - Which version control branch to checkout and build.

    The ccnet project checks out Branch URL and builds it to feature_[FeatureNumber].domain.com.

    http://cruisecontrolnet.org/projects/ccnet/wiki/Parameters