Teamcity 4.5 - agent plugin - infinite upgrades

I'm working on my first ever agent side "hello world" extension.  I've noticed that the documentation for Teamcity 4.x has removed the agent side extensions page.

This is my loose guide:  http://www.jetbrains.net/confluence/display/TCD3/Agent+Side+Extensions


Somehow my agent plugin has triggered and endless cycle of server -> agent upgrades, and I'm not sure what i've done wrong.

I've attached both the source and the actual plugin i'm attempting to install.

The class looks like this:

package com.test;

import jetbrains.buildServer.agent.AgentLifeCycleAdapter;
import jetbrains.buildServer.agent.AgentRunningBuild;

public class AgentExtension extends AgentLifeCycleAdapter {

@Override
public void buildStarted(AgentRunningBuild runningBuild) {
   
     System.out.println("I just got an event");
    
    super.buildStarted(runningBuild);
}
   
   
}


And my build-agent-plugin.xml is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

<beans default-autowire="constructor">
  <bean id="buildAgentHelloWorld" />

</beans>

I package this into a zip file which contains buildAgentPlugin.jar.

Finally, i copy to this to my teamcity installdir/webapps/ROOT/update/plugins, restart the server and then start the build agent.

The agent then goes into an endless cycle of updating iteslf.    Removing the buildAgentPlugin.zip from the installdir/webapps/ROOT/update/plugins makes the problem go away.


What step am I missing?    Are agent plugins supported in teamcity 4.5?

Thanks!
Ruel Loehr










On my end, I have taken buildagentplugin.zip and added it to teamcityinstall/webapps/ROOT/update/plugins



Attachment(s):
buildagentplugin.jar
buildagentplugin.zip
2 comments
Comment actions Permalink

Your zip archive must have a root directory with lib subdirectory containing jar files, see more on this here: http://www.jetbrains.net/confluence/display/TCD4/Plugins+Packaging
The problem is agent does not handle incorrect zip archive gracefully.

0
Comment actions Permalink

Yeah!  I just found that thread and was preparing a post.     Thanks for the quick response.  I rebuilt my archive in the correct format and it at least deployed with out an error.
Now I'll see if i can actually get it to log a message.

0

Please sign in to leave a comment.