Assign Agent to a different Pool via OpenAPI Plugin

Hello JB/TC -

I am interested in the ability to reassign agents to new pools via custom plugin.

 

I've searched through TeamCity OpenAPI documentation for means to assign an agent to a new pool when a job is complete, but have not been able to find suitable interfaces to access TeamCity's Agent Pool services. 

 

I have the ability to 'disable' an agent through OpenAPI using the snippet below, but I am unable to update the agent's pool.

override fun buildStarted(sRunningBuild: SRunningBuild) {
sRunningBuild.agent.setEnabled(false, null, "Build Flow Disabled")
}

 

Any assistance if possible would be greatly appreciated.

 

Regards,

Jc

3
1 comment
Avatar
Permanently deleted user

+1

Hi,

I'd like to assign agents to pools from a TeamCity plugin using JAVA API. What are the options?

Alina Mishina, Yegor Yarko Sergey Pak?

0

Please sign in to leave a comment.