Skip to content

64mb/go-teamcity

 
 

Repository files navigation

go-teamcity

GoDoc Build Status

LOOKING FOR MAINTAINTERS

This project is in need of new maintainers, please see here:
cvbarros#94.
cvbarros/terraform-provider-teamcity#113


go-teamcity is a Go client library interacting with Jetbrain's TeamCity CI server REST API.
Currently, guaranteed supported API version (on CI tests) is TeamCity 2019.2.2 or up.

Motivation

go-teamcity is intended for automating Jetbrain's TeamCity tasks and configurations using Go. It is also the client library used in TeamCity Provider, a Hashicorp's Terraform custom provider to configure TeamCity as code.

Usage

import teamcity "github.com/cvbarros/go-teamcity"

Construct a new Teamcity client with a default http.Client for the server at the TEAMCITY_ADDR environment variable, then use the various services exposed by the client to use TeamCity API's features.

client := teamcity.NewClient(teamcity.BasicAuth("admin", "admin"), http.DefaultClient)

or

client := teamcity.NewClient(teamcity.TokenAuth("token"), http.DefaultClient)
// retrieve a project identified 'myproject', using the id: locator
project,  err := client.Projects.GetById("myproject")

You may also use an teamcity.NewClientWithAddress(...) to explicitly provide the server address.

Examples

For now, integration tests are the best examples on how to use the library to interact with the several services.

Other Information

We follow semantic versioning conventions. Thus releases are tagged in the <major>.<minor>.<patch> format, meaning:

  • Public API breaking changes or major TeamCity version support (2018, 2019, etc) MUST increment the major version.
  • Features and considerable refactorings without breaking compatibility should increment the minor.
  • Bugfixes and minor patches should increment patch

All changes released are documented on the CHANGELOG.

Issues, contributions and feature requests are welcome, please see contributing for guidance on how to get involved.

The development and design of this library is based on the go-github project.

License

This library is distributed under the MPL-2.0 license fully described in the LICENSE file.

About

Golang client for TeamCity REST API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 99.2%
  • Other 0.8%