Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clarity on teamcity parameters and its types

Tags:

I'm trying to understand about variables in teamcity. My understanding is there are 3 kinds of variables(System,Env,Config)

But in jetbrains documentation I saw more variables. Looks like agent variables and server side variables are separate.

But in TeamCity, parameters section when I select "kind" config or system or env, all kinds of values are populated (I Expected only relevant values should come)

Not really clear about when we have to use which variable. Is TeamCity having 6 variables for parameters(Serverside:env,sys,config and Agent:env,sys,config).

like image 270
rajesh Avatar asked Sep 26 '16 11:09

rajesh


People also ask

What are parameters in TeamCity?

Edit page. Last modified: 27 October 2022. Build parameters are name-value pairs, defined by a user or provided by TeamCity, which can be used in a build. They help flexibly share settings and pass them to build steps.

What is build ID in TeamCity?

Last modified: 26 October 2022. An ID is an identifier given to TeamCity entities (projects, build configurations, templates, VCS roots, and so on). Each entity has two identifiers: external ID. Universally Unique ID, or UUID.


1 Answers

There are three types of parameters, they differ in a way they might be used in a build:

  • env parameters are passed to the build process (spawned by TeamCity) as environment variable
  • sys parameters set tool-specific variables (and therefore passed to the build scripts of the supported runners)
  • config parameters are meant to be used for build configuration customization

There're predefined parameters exposing server build properties, agent properties, agent build properties etc. These parameters are passed to the build as system parameters, some of them are also copied to the environment variables.

In addition, parameters might be defined

  1. for a certain build via "Run Custom Build" dialog
  2. in Parameters section of build configuration/project or build configuration/project template
  3. in buildAgent.properties file on the agent

More details might be found in the docs.

like image 137
cyberskunk Avatar answered Sep 26 '22 16:09

cyberskunk