Accessing Configuration Parameters from plugin

Hello,

I am new to TeamCity plugin development. I am experimenting with writing a 'IssueTracker' plugin, to connect to 'AgileZen'. I am able to connect to the AgileZen APIs and retrieve details of the stories/cards. I would like to store an integer ID, as part of a build and retrieve it from the plugin code. This ID will be required for the retrieval of data from AgileZen API.This ID is specific to a project and so, I am unable to request it as part of the plugin configuration (via TeamCity Admin section).

So, I have opted to store the ID as part of the build's 'Configuration Parameter'. Is this a good option? If yes, how would I retrieve the ID from my plugin code (in a class that extends AbstractIssueFetcher)?

Thanks,
Sri Prasanna

4 comments
Comment actions Permalink

Hello,

> I am experimenting with writing a 'IssueTracker' plugin, to connect to 'AgileZen'.

Great! Do you plan to make the plugin publicly available?

> I would like to store an integer ID, as part of a build and retrieve it from the plugin code.

The main idea of issue tracker integration in TeamCity is that issues are retrieved from the changes.
The main code in the case can be locaed in a method overriding AbstractIssueProvider.getRelatedIssues(VcsModification)

There is no (at least easy) way to retrieve issues based on the data stored in a build, nor there should be.

> This ID is specific to a project and so, I am unable to request it as part of the plugin configuration (via TeamCity Admin section).

If ID should belong to the project, then it should be configured there. The plugin can then get the project by VcsModification and read the value from there.
It seems you can start by configuring the ID as the project configuration parameter and later implement a dedicated UI and storage for the ID.

0
Comment actions Permalink

Hi,

Thanks for the info. That solved the issue. I am now able to retrieve the config and use it via my plugin.

Yes. I will make the plugin code available via my GitHub account.

I am now stuck with a proxy error. The plugin is failing to pull the issue/story details thru our corporate proxy. It works fine from my home network (which has no proxy).

How do I get around this problem please? Updating the "net.properties" under <TeamCity_InstallPath>\Jre\Lib does not help. Or maybe I set it up wrong?

Can you advise?

Thanks,
Sri Prasanna

0
Comment actions Permalink

The proxy issue is most probably not TeamCity specific. If it is, please detail.

Just a note: If the standard http communications are used, standard ways to configure proxy can help: http://docs.oracle.com/javase/6/docs/technotes/guides/net/proxies.html

0
Comment actions Permalink

Great response. Solved a few of my queries too. had a problem with storing the integer ID and was trying to retrieve it from a plugin code.


___________
agile software development

0

Please sign in to leave a comment.