问题
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:
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.
- Define a Snapshot dependency between "Build Services Installers" and "Deploy Installers" (if not already done)
- You can now access all Parameters of the first build in "Deploy Installers" by typing %dep. - Autocomplete will tell you the rest.
来源:https://stackoverflow.com/questions/33869384/how-to-pass-arguments-between-build-configuration-steps-in-team-city