Set build parameters based on a single option

Hello

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

2 comments
Comment actions Permalink

Hi Nick,

We have the related issue https://youtrack.jetbrains.com/issue/TW-24275#comment=27-403264, 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 (%teamcity.branch.name% equals "my_special_branch_name"){
   print ##teamcity[setParameter name='parameter1' value='special_value1']
   print ##teamcity[setParameter name='parameter2' value='special_value2']
}

0
Comment actions Permalink

Thank you very much!

0

Please sign in to leave a comment.