Client for TeamCity REST API written in Kotlin. The code snippet below will download *.zip
artifacts from the latest successfull build with tag publish
of the specified build configuration to out
directory.
val docs = BuildConfigurationId("Kotlin_StandardLibraryDocumentation")
val build = TeamCityInstance.guestAuth("https://teamcity.jetbrains.com").builds()
.fromConfiguration(docs)
.withTag("publish")
.latest()
build!!.downloadArtifacts("*.zip", File("out"))
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"
}