How to trigger a build to run on a specific agent? Without having to set up a whole new configuration?
Is there any way to trigger a build on a specific agent without making a whole separate configuration for just this one scheduled build?
Please sign in to leave a comment.
Hi Sabibo,
You can define a build parameter that specifies the agent you want to use and configure your build steps or requirements accordingly.
- Define a Custom Parameter: In your build configuration, create a custom parameter like agent.name and set it to the name of the agent you want to target.
- Configure Agent Requirements: Go to the "Agent Requirements" section of your build configuration and add a requirement for teamcity.agent.name to match the agent.name parameter.
For more detailed information about agent requirements, please refer to https://www.jetbrains.com/help/teamcity/agent-requirements.html#Agent+Requirements+Based+on+Environment+Variables+and+Properties
Thanks! But would not that limit the build configuration to one agent? Normally I want it to run on any available agent - I just also want the ability to select one particular one, at times…
If you want the build to run on any available agent, you can disable the agent requirements before running it. If you need to target a specific agent, you can enable the agent requirements.