Plug-in to modify version of VCS root used during build
I would like to be able to run a custom build using changes from a previous perforce changelist, but there is one file (build.xml) that I would like to always have at the most recent version, regardless of what all the other files are at since this file matches the configuration used in TeamCity to set up the project. I was looking to make a plugin implementing the ParametersPreprocessor interface but it only has fixRunBuildParameters, which doesn't look like it has the capabilities to easily change the version of this single VCS root. Do you have any suggestions as to where I could most easily modify the version for this file?
Thank you!
Kristin
Please sign in to leave a comment.
you could check out the file as a first step inside the build.
Or put build.xml into separate build configurations, and link them by artifact dependency. History build takes specific source revision within a build, but download latest artifacts from dependent builds.
Adding steps or artifact dependencies would work but we have many build configurations which use this build.xml file. As a result, if we were to do that, we would need to change all of them. We would prefer to just write a single plugin, that could take care of this issue in all existing build configurations as well as take care of any future ones without any additional work/knowledge of this.
The solution we found to be best was to add our own AgentLifeCycleListener listener and then call either the beforeRunnerStart event (called once per build step) or sourcesUpdated (called once per run)