User Supplied Parameters For A Build

We've run into a couple of scenarios where it would be really helpful to allow some sort of user supplied parameter when builds are manually invoked from the TeamCity console.

One example is a customer acceptance build we had which sometimes they wanted the db to be cleaned and sometimes they didn't.  In order to accommodate this in TC we had to either create two separate builds or have them go modify the ant target before running.

There are other examples too, where a user supplied parameter would be useful- sometimes there are arbitrary values the user could provide so creating a build for each option is not really feasible.

Just wondering what you guys think about this and if you might have any plans for this in the future.

Thanks

2 comments
Comment actions Permalink

For users with administrative access, we use the command line parameters of the build to tweak settings.

Recently, when converting a legacy Ant build to Maven we had to briefly disable testing, for instance. So I opened the build configuration page and added "-Dmaven.test.failure.ignore=true" to the command line options. When we had the build in better working order I updated the build configuration again to remove this. Your Ant script could check for the command line setting and determine how deeply to clean the database, for instance.

I don't think this is the ideal solution, but it's better than creatng a new build, or tweaking an Ant file.

The new version of TeamCity will have finer grained access controls, so it might be easier to grant the ability to change these settings. Although I think it would be better to add another option to the "Run | ..." button for the build that would allow modifying the existing command line parameters, for a single build.

0
Comment actions Permalink

Is this a feature we could accomplish by writing a plugin?

0

Please sign in to leave a comment.