Everytime a user executes a run on TeamCity, I want the TeamCity to prompt the user to enter certain parameters to be passed similiar to a custom run and if parameters are not passed, the build doesn't execute.
I understand custom run will allow this parameter passing but I want the parameter supplied condition to be met first before execution on a normal run, is this possible?
EDIT: It appears that you can have prompted parameters in TeamCity 7.x by using 'Typed build parameters': What's new in TeamCity 7.0 - Typed build parameters - have a look at the 'display type' options.
Although the terminology they use is that the parameters 'require a review' which suggests it doesn't force them to actually enter something, so perhaps this combined with the approach described below would be required for your scenario (i.e the user has to enter the correct parameters)
For TeamCity 6.5, I faced this problem a while back myself, and wasn't able to find a solution to prompt for the parameters. The normal run would just kick off as soon as 'Run' was clicked.
However, one thing that I did do was to include an upfront build step with a small batch script that would return an error if the necessary parameter(s) hadn't been supplied. This way at least I could ensure that the builds only ran (well, only ran succesfully) if the parameters were provided via the 'Run Custom' option.
Nonetheless, anyone trying to run the build had to know this, and had to know to select the 'Run Custom' option and provide the parameters to be able to get a green build.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With