I
I
ilyako872021-02-01 21:18:59
Continuous Integration
ilyako87, 2021-02-01 21:18:59

What are the possibilities of TeamCity for creating universal kts scripts?

Good afternoon!
I have a good experience with Jenkins.
And I have always preferred to use the Jenkins Pipeline to create the Job, because this plugin allows you to write fully Groovy-compatible code for assembly, using DSL features.
But, at the new place of work, TeamCity is used. I'm trying to figure out how flexible it can be.
So far, I'm implementing all the builds stupidly through the Build Steps set.
I know that it is possible to write a build script on Kotlin DSL https://www.jetbrains.com/help/teamcity/kotlin-dsl.html
Looking at the tutorials and manuals, I got the impression that the structure of such a script is very strictly formalized.

import jetbrains.buildServer.configs.kotlin.v2019_2.*
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.script

version = "2020.2"

project {
  buildType(HelloWorld)
}

object HelloWorld: BuildType({
    name = "Hello world"
    steps {
        script {
            scriptContent = "echo 'Hello world!'"
        }
    }
})


It seems that by describing the assembly in this way, there is simply a replacement for clicking on the settings in the UI interface for writing in this form. Or I'm wrong? Who can share experience or github links?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question