Set build parameters based on a single option


I have a build configuration that requires 2 perameters to be set and a branch to be selected. These are the following

Build configuration: Debug | Release
Environment: Development | Staging
Build Branch (from changes tab)

Ideally what i would like, is to only select the Environment. and the other two to be automatically assigned based on the environment selection.

Something like
Environment Development: Debug | Branch-develop
Environment Staging: Release | Branch-master

This way, every time a build is run, only one dropdown will need to be selected, and there is no posibility for a wrong combination (e.g development environment with release confiuration from master branch! We don't want that!)

Any ideas?

thanks in advance

Comment actions Permalink

Hi Nick,

We have the related issue, vore for it or feel free to create new one.
A current workaround is to add an extra first build step which will have logic like:

if ( equals "my_special_branch_name"){
   print ##teamcity[setParameter name='parameter1' value='special_value1']
   print ##teamcity[setParameter name='parameter2' value='special_value2']

Comment actions Permalink

Thank you very much!


Please sign in to leave a comment.