Domanda

I'd like to run a build with different values for a specific environment variable.

I know that Jenkins alows this with its "matrix" builds, where you define a set of env variables and it builds the project with all the combinations of these variables:

2 variables:

TARGET = X86, X64
DEBUG  = 0,   1

Will produce 4 builds:

        | X86 | X64 |
DEBUG 0 |  X  |  X  |
DEBUG 1 |  X  |  X  |

I didn't find the option in TC, apart from copy/paste a build conf and modify by hand the environment variable.

Is this possible in teamcity?

È stato utile?

Soluzione

There is no existing option for that in TeamCity (as of TeamCity 8.0.1).

Your options here are:

  • create a base build configuration template and 4 build configurations which inherit from this template with different setting for environment variables
  • use a manual triggering of the builds, but alter the value of the environment variable on build start (use Run custom build dialog for this)
  • write a custom TeamCity plugin which would allow to run a bunch of builds with appropriate variables set

    Regards, KIR

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top