The teamcity.build.parameter exposed by teamcity is a configuration parameter. To change it into a system /env parameter , in your build parameters , define a a system parameter whose value is always going to be %teamcity.build.parameter%
You can pass in properties into build files using system parameters . You can use the ${env.my_parameter} construct to get this value if it is an env variable or a ${system_parameter} construct to get its value if you define it as a system parameter