I am trying to implement a TeamCity Plugin, a Build Feature which copies artifacts to a Network Share Release Folder. Specifically..
- Artifacts that are generated by the normal TeamCity "Build Steps" and captured as part of the "Artifacts paths" parameter, are copied by the plugin to an additional network location from where other Enterprise / Deployment tools can access them.
- The plugin should run on the Agent side and not on the Server Side
- I intend on running this step as part of the afterAtrifactsPublished Notification
- Ideally I would like to log all steps of this process to the "Build Log" so that a user can see through the Web Interface exactly what is happening, and where the files are copied to.
- It is important that if any of the artifacts cannot be copied to Release Area, the whole build fails.
I have looked at a number of similar plugins such as Deployer and NetPublisher, and also looked at their source code. I have a number of question regarding how to implement what I am trying to do....
- How do I actually get the Artifacts on the Agent side. For the server side we have the function SRunningBuild.getArtifacts(BuildArtifactsViewMode.VIEW_DEFAULT), but there does not seem to be anything equivalent for the agent side
- How can I log these steps to the Build Log.
- How would I fail the build in case any of the steps fails to complete properly.
- When creating the Plugin, how do I explicitly let it that this is a build feature and not any other type of plugin
- How do I check whether the plugin is enabled / disabled for a build config. We make use of a lot of Templates within our Build Setup and sometimes disable a feature in the inheriting config. I would like to be able to check whether the plugin is enabled for that config.
Apologies if any of these question seem trivial, but this my first TeamCity plugin.
Our environment consist of TeamCity Enterprise 7.1.5 (build 24400) on Windows Server 2008R2.
Thanks in advance for any help,