I am creating a kotlin DSL for a TeamCity project, and want to get the current branch name in the actual kotlin script.
If I run a script step, the current branch renders correctly
script {
name="print branch"
scriptContent = """echo "Branch is %teamcity.build.branch%""""
}
From the actual settings.kts
, I don't seem to have access to it
val currentBranch = DslContext.getParameter("teamcity.build.branch") //yields '<placeholder-1>'
How can I get this parameter in my Kotlin code?