Teamcity build with YAML file as input

1.8k Views Asked by At

I'm trying to use a YAML file as a standard-in to teamcity to pass build parameters. (user will copy the yaml file as stdin) .

which build runner should i use to achieve this. I can find command line as a build runner.but it simply use arguments to a script ? ( i can do the same) but is there any way that i can copy configuration details to teamcity without an argument to a script ?

1

There are 1 best solutions below

0
On

Jetbrains seems to prefere not do go with yaml. But you can still give XML or Kotlin DSL a try:

You can store project settings in the XML format or in the Kotlin language and define settings programmatically using the Kotlin-based DSL. Kotlin DSL

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

version = "2021.1"

project {
  buildType {
    id("HelloWorld")
    name = "Hello world"
    steps {
        script {
            scriptContent = "echo 'Hello world!'"
        }
    }
  }
}