Skip to content

Commit f03fedd

Browse files
Oren NovotnyJakeGinnivan
authored andcommitted
doc update
1 parent 7b229fe commit f03fedd

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

docs/more-info/build-server-setup/tfs-build-vnext.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
11
# Visual Studio Online (Build vNext) Setup
22
## Basic Usage
3-
In [Visual Studio Online](https://www.visualstudio.com/) build vNext (the web based build system) you can add a build step as follows:
3+
In [Visual Studio Online](https://www.visualstudio.com/) build vNext (the web based build system) you can add GitVersion as a Build Step. This requires a one-time setup to import the GitVersion task into your VSO instance.
44

5-
* **Build Step:** Command Line
6-
* Might need to fully qualify the path.
7-
* Tip: Use a script and/or another command step to call `NuGet Install GitVersion.CommandLine` first so you don't have to check in the exe.
8-
* **Tool:** `GitVersion.exe`
9-
* **Arguments:** `/output buildserver /updateassemblyinfo true`
5+
## Installing/updating the VSO Build Step
6+
1. Install the `tfx` command line tool as shown [here](https://github.com/Microsoft/tfs-cli/blob/master/docs/buildtasks.md)
107

11-
Then in your build parameters simply [add a placeholder](#nuget-in-teamcity) of the GitVersion variables you would like to use.
8+
2. Download the GitVersion VSO extension from here **TODO determine link** and unzip.
9+
3. Run `tfx login` if you haven't yet, make sure to use `https://<server>.visualstudio.com/DefaultCollection` as the URL and provide a Personal Access Token
10+
4. From the directory outside of where you unzipped the task, run `tfx upload .\GitVersionVsoStep` where GitVersionVsoStep is the directory containing the files.
11+
5. It should successfully install
1212

13-
GitVersion writes build parameters into VSO, so they will automatically be passed to your build scripts to use.
13+
## Using the GitVersion VSO Build Step
14+
From a VSO vNext Build Definition, select "Add a Step" and then in the Build category, choose GitVersion and Click Add. You'll probably want to drag the task to be at or near the top to ensure it executes before your other build steps.
15+
16+
If you want the GitVersionTask to update AssemblyInfo files, check the box in the task configuration. For advanced usage, you can pass additional options to the GitVersion exe in the Additional arguments section.
17+
18+
## Using the GitVersion Variables
19+
GitVersion writes build parameters into VSO, so they will automatically be passed to your build scripts to use. It also writes GITVERSION_* environment variables that are available for any subsequent build step.
1420

15-
## GitVersion Build Step for VSO
16-
Visual Studio Online has support for custom build steps. This is planned but TBD. For now, the command line does work.
1721

1822

19-
## Running inside TeamCity
23+
## Running inside Visual Studio Online
2024
* We output the individual values of the GitVersion version as the build parameter: `GitVersion.*` (Eg: `GitVersion.Major`) if you need access to them in your build script
2125

2226
### NuGet in VSO

0 commit comments

Comments
 (0)