Skip to content

Gitlab CI support #806

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 4, 2016
Merged

Gitlab CI support #806

merged 2 commits into from
Apr 4, 2016

Conversation

dfyx
Copy link
Contributor

@dfyx dfyx commented Mar 7, 2016

I've added build server support for GitLab CI. The implementation is just copied from the code for Jenkins with a few small changes to use the correct environment variables.

We've been using this in production with an MSBuild Task for a few weeks and it works great with no further configuration required.

@gep13
Copy link
Member

gep13 commented Mar 7, 2016

@dfyx thanks for your contribution to GitVersion, it really is appreciated! Just a couple questions...

I haven't played with GitLab CI, so please excuse my ignorance, is there a way to set the Build Number in GitLab?

@gep13
Copy link
Member

gep13 commented Mar 7, 2016

@dfyx or anyway to set build parameters?

@dfyx
Copy link
Contributor Author

dfyx commented Mar 7, 2016

GitLab CI allows build scripts to be arbitrary shell scripts (both bash and Windows Batch are supported), so you can just run GitVersion as the first step of your build and dump everything into normal environment variables like you would probably do on a development machine.

I haven't played around much with the GitVersion command line tools. Instead I've used the MSBuild task via a Nuget package (I install my patched version of the package through my company's private Nuget repository server). Without my patch it complained that it could not find the current branch name so I just adapted the script for Jenkins to read that out of the correct environment variable.

GitLab CI even sets some pretty useful variables on its own such as CI_BUILD_ID. More details can be found at http://doc.gitlab.com/ce/ci/variables/README.html

(I hope that answers your question. If not, just ask again, I'm happy to help)

@dfyx
Copy link
Contributor Author

dfyx commented Mar 21, 2016

ping

@dfyx
Copy link
Contributor Author

dfyx commented Mar 31, 2016

@gep13 @JakeGinnivan Is there any more info you need to merge this? The code has been running on our build servers for weeks now and we didn't have a single problem.

@gep13
Copy link
Member

gep13 commented Mar 31, 2016

@dfyx no, no further information I required, I, or Jake, just need to find the time to review properly, and merge into main branch. Sorry for not looking at this, we really do appreciate your contribution!

@JakeGinnivan JakeGinnivan merged commit a66a83c into GitTools:master Apr 4, 2016
@gep13
Copy link
Member

gep13 commented Apr 4, 2016

@dfyx thanks again for your contribution to GitVersion, and apologies for the delay in getting this pulled in! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants