Continuous Integration server options provided by Stash

Mohan Krishnan April 7, 2013

Hello ,

Can we integrate stash with Continuous Integration server other than Bamboo?

Regards,

Mohan

1 answer

1 accepted

0 votes
Answer accepted
TimP
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 8, 2013

Hi Mohan,

You can indeed! You'll just need to configure your build server to post build results to the Stash Build Status REST API. See the documentation on Updating build status for commits for details.

Depending on your CI server, someone may have already built integration for you. For example:

cheers,

Tim

Mohan Krishnan April 8, 2013

But i wanted it the other way .. A push to stash server should be queued for build in a continious integration server not the build server posting build results to the Stash Build Status REST API.

TimP
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 8, 2013

Hi again Mohan,

Absolutely! You could either:

  1. set your build server to poll your Stash repository for changes (just like any other git repository); or
  2. (more efficient) you could install a repository hook that notifies your build server when changes are pushed to your Stash repository. This repository hook example demonstrates just that.

Again, I'd do a quick google to see if someone's already built a Stash hook that integrates with your particular build server before going off and writing your own.

cheers,

Tim

Mohan Krishnan April 8, 2013

Thanks Tim !

So can i push commit/branch from my git client (local repository ) to refs/for/<branchname> ( like gerrit ) in stash server and use the repository hook to notify build server of the available changes in refs/for/<branchname>

TimP
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 8, 2013

Yep! That's the general idea. Have a look at the repository hook example I linked to above for the nitty-gritty of actually building a hook to do that.

TimP
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 2, 2013

Hi again Mohan,

If you're satisfied with this answer, would you mind marking it as correct?

cheers,

Tim

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events