We are using GitLab to manage our repos. We are trying to follow GitFlow processes and as part of that we would like to be able to build and execute the tests against any merge request automatically in TeamCity.
From what I can see this is possible in GitLab CI but moving over to that isn't a realistic option for us.
I have seen tutorials about achieving this on GitHUB using a branch specification like +refs/pull/*/merge - does a similar branch specification get created by GitLAB?
We are using version 4.2 of GitLab but can upgrade if required for this feature and version 8 of TeamCity
I have GitLab 6.3 and TeamCity 8 and I need build feature branches too. We have following workflow (it is based on git-flow, but slightly changed according to our release cycle).
So, we have development
branch and one pushes feature branch with a specific name dev/feature-name-here
.
Next, one creating a Merge Request in GitLab from dev/feature-name-here
to development
.
TeamCity is configured to automatically run builds for each branch with the following refspec: +:refs/heads/dev/(*)
so we can see a build for branch feature-name-here
is automatically started.
Next, I have a custom script which is embedded to GitLab's merge request page. It do the following.
devUnit
, devIntegration
, devWhatever
, etc...)Now it looks like this:
Now this approach has some drawbacks like if one updates a branch with another push I can't figure out from GitLab page is new commits is already built or I'm seeng old build status, so I need to click on a build link and check in TeamCity
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With