Answer the question
In order to leave comments, you need to log in
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!'"
}
}
})
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question