Skip to content

Instantly share code, notes, and snippets.

@antonarhipov
Created January 9, 2020 20:47
Show Gist options
  • Save antonarhipov/47a82e1c7c3c0b97ccce2595a7bb16c1 to your computer and use it in GitHub Desktop.
Save antonarhipov/47a82e1c7c3c0b97ccce2595a7bb16c1 to your computer and use it in GitHub Desktop.
TeamCity Kotlin DSL - build configuration with template
version = "2019.2"
project {
vcsRoot(ProjectVcs)
buildType(Build)
template(MyTemplate)
}
object Build : BuildType({
templates(MyTemplate)
name = "Build"
steps {
script {
scriptContent = """echo "Build something""""
}
}
})
object MyTemplate : Template({
name = "MyTemplate"
vcs {
root(ProjectVcs)
}
steps {
script {
scriptContent = """echo "First""""
}
placeholder { }
script {
scriptContent = """echo "Last""""
}
}
})
object ProjectVcs : GitVcsRoot({
name = "ProjectVcs"
url = "git://some.git.repository"
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment