Icon

You are viewing the documentation of TeamCity 2018.x, which is not the most recently released version of TeamCity.
View this page in the latest documentation or refer to the listing to choose the documentation corresponding to your TeamCity version.

 

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Portable DSL for a simple project looks like this:

 

Code Block
titleSimple Project in Portable DSL
languagegroovy
import jetbrains.buildServer.configs.kotlin.v2018_1.*
import jetbrains.buildServer.configs.kotlin.v2018_1.buildSteps.script
import jetbrains.buildServer.configs.kotlin.v2018_1.vcs.GitVcsRoot

project {
    buildType(Build)
    vcsRoot(Sources)
}


object Build : BuildType({
    name = "Build"
    vcs {
        root(Sources)
    }
    steps {
        script {
            scriptContent = """
                #!/bin/bash
                echo 'Hello World'
            """.trimIndent()
        }
    }
})


object Sources : GitVcsRoot({
    url = "https://github.com/me/project.git"
})

 

...