All Projects → JetBrains → Teamcity Rest Client

JetBrains / Teamcity Rest Client

Licence: apache-2.0
Client for TeamCity REST API written in Kotlin

Programming Languages

kotlin
9241 projects

teamcity-rest-client JetBrains team project License plugin status Download

Client for TeamCity REST API written in Kotlin. The code snippet below will download *.zip artifacts from the latest successful build with tag publish of the specified build configuration to out directory.

val docs = BuildConfigurationId("Kotlin_StandardLibraryDocumentation")
val build = TeamCityInstanceFactory.guestAuth("https://teamcity.jetbrains.com").builds()
                            .fromConfiguration(docs)
                            .withTag("publish")
                            .latest()
build!!.downloadArtifacts("*.zip", File("out"))

Another snippet will run a build on your own server

val tc = TeamCityInstanceFactory.httpAuth(
        "https://myserver.local", "login", "password")

val buildConfiguration = tc.buildConfiguration(BuildConfigurationId("BuildConfId"))
val build = buildConfiguration.runBuild(
        parameters = mapOf("myparameter1" to "value", "myparameter2" to "value")
)

Published on jcenter

https://bintray.com/bintray/jcenter?filterByPkgName=teamcity-rest-client

You can add the dependency in your build.gradle file:

repositories {
    jcenter()
}

dependencies {
    compile "org.jetbrains.teamcity:teamcity-rest-client:PACKAGE_VERSION"
}

Contributing

Your contributions are welcome, please read the CONTRIBUTING.md for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].