Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion docs/input/docs/build-server-support/build-server/bamboo.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ Title: Bamboo

If you use Bamboo then you will have to use GitVersion from the command line, as
there is no actively supported app. You can use the "Inject Bamboo Variables"
task to read the GitVersion output back into Bamboo. Below is a Linux example
task to read the GitVersion output back into Bamboo. Below are two examples
using the [.NET Core GitVersion global tool](https://www.nuget.org/packages/GitVersion.Tool/).

## Example

The first script can be run on a Linux build host, the second script can be run on
a Windows build host using Powershell. The build only needs one of the two.

### Task: Script

**Script body**
Expand All @@ -19,6 +22,14 @@ using the [.NET Core GitVersion global tool](https://www.nuget.org/packages/GitV
sed -i '1d;26d;s/ //;s/"//g;s/,//;s/:/=/' gitversion.txt
```

### Task: Script

**Script body**

```powershell
(dotnet gitversion | ConvertFrom-Json).PSObject.Properties | ForEach-Object { Write-Output "$($_.Name)=$($_.Value)" } | Out-File -Encoding UTF8 -FilePath gitversion.txt
```

### Task: Inject Bamboo variables Configuration

**Required Properties**
Expand Down