Is there a way to create a build step that is triggered before every stage of my build pipeline?

Hi,

Other than using a base template, is there a way to execute some code (e.g. bash script) before each stage of a build pipeline?

0
3 comments

If you start some common build script then this script can always execute some code. If you're looking for pure TeamCity solution, then templates are the way to go.

0
Avatar
Permanently deleted user

Hi Pavel,

I was basically looking for a way to define a build configuration that is not tied to any projects and then define a triggering condition for it such as "Run this step whenever build configurations a, b, c, or d are run".

For example, let's pretend we have a project named "Sample Project" that has several sub projects each with a few build configurations:

+ Sample Project
+ Sub Project 1
  + Build
  + Unit Test
  + Deploy
  + Integration Test
+ Sub Project 2
  + Build
  + Unit Test
  + Deploy
  + Integration Test

+ Sub Project 3
  + Build
  + Unit Test
  + Deploy
  + Integration Test

I want to define a build Configuration not tied to any single Sub Project (e.g. defined on Sample Project) and configure it to get executed before the following build configurations:

* Sample Project/Sub Project 1/Build
* Sample Project/Sub Project 2/Build
* Sample Project/Sub Project 3/Build

Do you see any reasons why this might not be a good idea/feature? If not, I can submit a feature request. But if you think for one or more reasons this is not a good feature, could you please explain?

Thanks,
Behrang

0

Behrang, generally speaking. templates are offering all necessary functionality. Also, the in TC concepts all build actions take part in one build. There's no injection, etc.

0

Please sign in to leave a comment.