Meta-runner is a Build Runner which acts as a combination of one or more build runners and has user interface targeted to user domain. For example, it is possible to configure build step based on Ant to upload some file to ftp. You can move this build step in some template, replace host, user and password with parameter references (%host%, %user%), and then reuse this template in several build configurations. This approach gives some flexibility, but is not very user friendly. Isn't it better to have a dedicated build runner for this task with specific user interface? This is what Meta-runner about.
Let's see how it works. Sometimes during the build process we need to replace some pattern in several files before making a distribution package. For example, if you build a TeamCity plugin you need to provide build number in teamcity-plugin.xml file bundled with the plugin. Let's try to create a build runner based on Ant ReplaceRegExp task with the following parameters in user interface:
- pattern to search in files
- replacement string
- patterns for files where replacement must be performed
First of all I need to create a build configuration with Ant build step and with replace target that will do all the work. I'll use the following custom build xml:
<project default="replace" name="ReplaceRegExp"> <target name="replace"> <touch> <fileset dir="%basedir%"> <include name="%files_to_include%"/> <exclude name="%files_to_exclude%"/> </fileset> </touch> <replaceregexp flags="g"> <regexp pattern="%pattern_to_replace%"/> <substitution expression="%substitution%"/> <fileset dir="%basedir%"> <include name="%files_to_include%"/> <exclude name="%files_to_exclude%"/> </fileset> </replaceregexp> </target> </project>
Queued build page
Dependencies progress has been added on queued build page, you can now see estimates for all dependencies in one place.