How to run an agentless build step as the first/middle step in a build?
Is there any way to run an agentless build step as the first/middle step in a build? The current documentation recommends running it as a last step, and indeed the only way to call back is to mark the entire build as successful. So as I understand it, this feature appears to be more of an “agentless last build step” rather than “agentless build step”. What can I do to have an agentless first build step, and then after the external process calls back to TeamCity, resume the remaining steps.
Use case: I'd like to run some UI automation tests which can take hours, so ideally the agent isn't tied up while it's waiting and can service other builds. Eventually when the automation tests are complete, it calls back to TeamCity then resumes the remaining steps where it processes the results, output, notifications, etc.
Please sign in to leave a comment.
Yes, the releasing build agent functionality is designed to be used in the last build step. For example, it can be helpful when all the build steps that require a build agent are finished, but for the build to be completed, some other tasks that do not require a build agent must be finished.
Consider designing a build chain for your scenario, i.e., dividing your build configuration into multiple ones and setting up the dependencies. This way, you can release a build agent at the end of build configuration 1, and the following build configuration will be executed once the dependencies are satisfied. Please see the documentation for the details: https://www.jetbrains.com/help/teamcity/2023.11/build-chain.html.
Please let me know if this approach suits your requirements.
Best regards,
Anton