Teamcity equivalent of Jenkins DSL plugin



Is there a way to express the definition of a build job as "configuration as code"? It has the obvious benefits of being able to version control, script and automate the job creation process. Jenkins has a plugin for that, the job DSL plugin. If there's no functionality at the moment, are there any plans to support this functionality in the future?



Comment actions Permalink

There is also jonnyzzz's TeamCity2DSL on Github.


Here is him talking about some implementation options.

Comment actions Permalink

Hi Guys,

In the upcoming TeamCity 10 version we are working on DSL for defining build configurations. Here is the related request, please watch it to get status updates.

Comment actions Permalink

We have released TeamCity 10.0 EAP2 with DSL support. Please try it, your feedback is appreciated!

Comment actions Permalink

The DSL example on the Confluence page is kind of broken, maybe you could format it something like this? 
It would be a shame if people are put of from this feature by the scary looking, broken formattting ;)

object Project : KProject(
uuid = "my_project_id"
extId = "ExampleOfDSL"
parentId = "_Root" // id of the parent project
name = "Example of DSL"
val vcsRoot = vcsRoot {
uuid = "my_vcs_root_id" extId = "ExampleOfDSL_VcsRoot" type = "jetbrains.git"
name = "Example of DSL VCS Root" param("url", "<url to my git repository>")
buildType {
uuid = "my_build_type_id"
extId = "ExampleOfDSL_Build"
name = "Build"
vcs { entry(vcsRoot) }
steps {
step {
type = "Maven2"
param("goals", "clean test")
options { buildNumberPattern = "%build.counter%" }
requirements { contains("", "Linux") } }
Comment actions Permalink

Hi Kevin,

Thank you for the report. We fixed the documentation. Also please note that there were changes after EAP2 in DSL. The working example for the upcoming TeamCity 10.0 version can be found here.

Comment actions Permalink

Thanks for sharing!


Please sign in to leave a comment.