Conditionally execute a TeamCity build step

前端 未结 4 2066
野趣味
野趣味 2020-12-16 09:16

I am working on defining a general-purpose build template for all our projects -- which I have placed at the \"root project\" level (thanks to this new feature of TeamCity 8

4条回答
  •  感情败类
    2020-12-16 09:30

    As of 2020.1, it appears this feature is now supported.

    See https://www.jetbrains.com/help/teamcity/what-s-new-in-teamcity-2020-1.html#WhatsNewinTeamCity2020.1-Conditionalbuildsteps

    Now, you get granular control over build steps with the new execution conditions. When running a build, TeamCity will execute each step only if all its preconditions, configured by you, are satisfied in the current run.

    In the advanced build step settings, click Add condition and specify a logical condition for any build parameter provided by the TeamCity server or agent. You can quickly select among the example conditions, such as:

    • Run the step only in the default branch
    • Run the step only in the release branch
    • Skip the step in personal builds

    Or, create a custom condition, and TeamCity will automatically suggest supported parameters and values. A wide set of logical conditions and parameters is available.

提交回复
热议问题