SiberianGuy
SiberianGuy

Reputation: 25312

Get branch name from TeamCity build

I am deploying a nuget package which is a result of TeamCity Feature Branch build. The build number format I use includes branch name: 1.0.0.%build.counter%-%vcsroot.branch%.

I need branch name at Octopus Deploy side to customize my deploy. What is the right way to have branch name as a Variable?

Upvotes: 3

Views: 1511

Answers (1)

Matt
Matt

Reputation: 3704

We should be able to parse this out from the Package Name and set an Octopus Variable using something like this

  1. Create the variable

Variable

  1. Create a step to extract the NuGet (no features) and a PowerShell step

Steps

  1. Use some PowerShell to set the variable by parsing the version number of that package

enter image description here

Hope this helps

Upvotes: 6

Related Questions