TFS Build tag git branch with build number

1k views Asked by At

All our builds are CI triggered builds.

Is there a way to tag the branch with the build number from TFS?

This would be come incredibly handy as we are also using Octopus Deploy and would like the entire process to automated, to where all the developer has to do is push the changes to the remote and the build and deployment happen auto magically.

1

There are 1 answers

0
Giulio Vian On BEST ANSWER

Should not be hard.

In a post-build script invoke Git after extracting data from Build Environment Variables:

  • TF_BUILD_BUILDNUMBER contains the Build number
  • TF_BUILD_SOURCEGETVERSION contains the Git Commit