5

I am new to team city and i just started using the existing team city configuration. I have a requirement to pass the build number (ex:- 7.6.0.4) generated in a build configuration (01 Build Services Installer) to another build configuration (03 deploy installers). The Build number is generated at run time so it will change for every build. How can i pass this build number to the one of the build step in 'deploy installers' configuration? I am using powershell to run my script and i need to pass this build number to this powershell script.

Thanks in advance.

Team City Screen shot

1 Answers1

8

The regular way to achive this in TeamCity would be to define a Dependency between the builds, then you can access all Parameters from previous builds.

  1. Define a Snapshot dependency between "Build Services Installers" and "Deploy Installers" (if not already done)
  2. You can now access all Parameters of the first build in "Deploy Installers" by typing %dep. - Autocomplete will tell you the rest.
Mecaveli
  • 1,507
  • 10
  • 16
  • Mecaveli, thanks for your suggestion. It worked well. I have added the Snapshot dependency onto "Build Services Installers" and could use %dep.....% parameter to extract the latest build number from it. I never know that we can get the parameters using Snapshot dependency. Good Learning. Thanks a ton for your help. – Sateesh Boggarapu Nov 25 '15 at 11:44
  • You´re welcome, feel free to upvote / accept my answers if it was helpful :) – Mecaveli Nov 25 '15 at 13:03