Teamcity equivalent of Jenkins DSL plugin

Answered

Hi,

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?

Thanks,

Ben

8 comments
Comment actions Permalink

There is also jonnyzzz's TeamCity2DSL on Github. https://github.com/jonnyzzz/TeamCity2DSL

 

Here is him talking about some implementation options. http://jonnyzzz.com/blog/2016/03/08/gradle-for-dsl/

0
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 https://youtrack.jetbrains.com/issue/TW-42364, please watch it to get status updates.

0
Comment actions Permalink

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

0
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("teamcity.agent.jvm.os.name", "Linux") } }
}
)
0
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.

0
Comment actions Permalink

Thanks for sharing!

0

Please sign in to leave a comment.