Advice Needed - Metrics Collection
Folks,
BACKGROUND
-
We have a centralized corporate metrics database for all things software dev related that needs to be populated with build information. The data we want looks like this:
Build Date, Project Name, Project Admin, Status
Simple really. Most of this I can get through the standard feed for a build but there are a few challenges:
How do you get a feed of all projects and builds?
How do you add the name of the person with the Project Admin role to the feed template?
QUESTION
-
What do you think the best approach to building a metrics "pumper"
- Should I just hit the backend database directly? Ick.
- Should I create metrics plugin using classes like jetbrains.buildServer.serverSide.statistics.build.BuildFinishAware?
- Will this give me access to the users associated with the project being built?
- Can this data be collected via feeds? Please say yes. ;)
Thanks for your time,
Robert Evans
Please sign in to leave a comment.
Robert,
Feed generator page (available from the My Settings and Tools page) allows to select all the Build Configurations.
The URL will look like:
http://teamcity.server/httpAuth/feed.html?itemsType=builds
This is not possible to do in the feed template. I just added an extension point to allow adding any objects into the template context with a bit of Java code. The extension should be included in 4.0.
Most appropriate approach seems to be a separate plugin. It can provide the data via a web page or via any other means.
You should rather use TeamCity's openAPI from a plugin.
While not recommended, you can also read the information directly from the database but you should be ready to update your code with each TeamCity upgrade.
Yes, you could listen for the build finish events, or just get the builds history (e.g. from BuildHistory interface) when necessary.
You can get al the users in the system via UserModel.getAllUsers
Sorry, but not currently. See my related comment above.
--
Best regards,
Yegor Yarko
Project Manager (TeamCity)
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"