forked from sashagavrilov/docker-gitversion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MR_DockerGitVersion.xml
22 lines (21 loc) · 1.13 KB
/
MR_DockerGitVersion.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?xml version="1.0" encoding="UTF-8"?>
<meta-runner name="GitVersion in Docker">
<description>Run GitVersion in a docker containter</description>
<settings>
<parameters>
<param name="GitVersion.Git_Branch" value="" spec="text description='For GitVersion to pick up pull requests properly you need to promote the `%teamcity.build.vcs.branch.<VCS root ID>%` variable.' display='normal' label='VCS branch:'" />
</parameters>
<build-runners>
<runner name="Run GitVersion" type="simpleRunner">
<parameters>
<param name="teamcity.step.mode" value="default" />
<param name="use.custom.script" value="true" />
<param name="script.content"><![CDATA[
docker pull ilucker/gitversion
docker run --rm -u $(id -u %env.USER%):$(id -g %env.USER%) -v "%teamcity.build.checkoutDir%:/src" -v "%teamcity.agent.home.dir%:%teamcity.agent.home.dir%" -e TEAMCITY_VERSION="%env.TEAMCITY_VERSION%" -e Git_Branch=%GitVersion.Git_Branch% ilucker/gitversion /output buildserver
]]></param>
</parameters>
</runner>
</build-runners>
</settings>
</meta-runner>