0

I have 2 different build configurations in team-city. Each has it's own build chain.

The first just builds the product. The second also builds the product but also builds and run unit tests. We are invoking them manually depending on our needs.

Now the question is it possible to have single entry point that will do perform conditional execution via some parameter/argument. ( I click on button, provide option to have simple build or build with unit tests )

I am thinking about having "wrapper" shell-script configuration, that will execute the chain needed via REST depending on given parameter. However this have obvious disadvantage of broken integrity (you can't really follow what is happening)

Any other solutions welcome!

libxelar.so
  • 473
  • 4
  • 16

1 Answers1

0

Make two TeamCity builds, one for the "build the product" and one for the "Test the product". The "build the product" build should save binaries as artifacts. "Test the product" build should have the "build the product" as snapshot and artifact dependency. Don't set any triggers for either build.

Now you can use the run custom build button. "build the product" build is easy enough just press run build. For the "Test the product" build, depending on your exact needs you might want to press the dots in the UI next to the run button, switch to the dependency tab and change the setting rebuild snapshot dependency to all to force a rebuild of the "build the product" build.

I am not very familiar with the REST APIs. If it supports running custom builds you can now use a shell script to run either the "build the product" or "Test the product". The advantage with this solution is you can now tell what is going on in the TeamCity UI.

sdc
  • 110
  • 1
  • 10